ワードプレス

Twentyseventeenの動画ヘッダーをスマホでも表示させる

 

Twentyseventeenのヘッダーメディアで動画を入れ、PCでもスマホでも表示させるには以下を記述

 

 

 

 

style.cssに、

 

/ *小さい画面で再生/一時停止ボタンをクリックできることを確認してください* /
。wp-custom-header-video-button {
z-index : 10 ;
}

 

 

 


 

functions.phpに、

 

 


<?php
/**
 * Twenty Seventeen Child Theme functions
 *
 * @link https://developer.wordpress.org/themes/basics/theme-functions/
 *
 * @package WordPress
 * @subpackage Twenty_Seventeen
 * @since 1.0
 */

/*
 * Enqueue parent and child theme styles.
 */
function twentyseventeenchild_enqueue_styles() {
	$parent_style = 'twentyseventeen-parent-style';
	wp_enqueue_style( $parent_style, get_template_directory_uri() . '/style.css' );
}
add_action( 'wp_enqueue_scripts', 'twentyseventeenchild_enqueue_styles' );

/*
 * Change the minimum screen size to use the video header
 */
function twentyseventeenchild_video_size( $settings ) {
	$settings['minWidth'] = 100;
	$settings['minHeight'] = 100;
	return $settings;
}
add_filter( 'header_video_settings', 'twentyseventeenchild_video_size' );

 

 


 

2022-01-16 | Posted in ワードプレスComments Closed 

 

WordPressメディア追加できない

PHPバージョンアップでのWordPressの不具合

 

  • thumbnailが変更、表示が出来ない
  • メディアの追加が出来ない
  • テーマ検索ができない

 

等々。。。

 

 

 

htaccessへ追加↓

 

PHP_value default_charset none
PHP_value output_handler none

 

 

 

2019-06-30 | Posted in お知らせ, ブログ, ワードプレスComments Closed 

 

WordPress|comment

コメント欄の入力項目、メルアドなど消す

comment.phpを

<?php comment_form(); ?>

<?php
$comments_args = array(
	'fields' => array(
		'author' => '<p class="comment-form-author">' . '<label for="author">' . __( 'Name' ) . ( $req ? ' <span class="required">*</span>' : '' ) . '</label> ' .
		            '<input id="author" name="author" type="text" value="' . esc_attr( $commenter['comment_author'] ) . '" size="30"' . $aria_req . ' /></p>',
		'email'  => '',
		'url'    => '',
	),
	'title_reply'          => 'コメントをどうぞ',
	'comment_notes_before' => '',
	'comment_notes_after'  => '<p class="form-allowed-tags">内容に問題なければ、下記の「コメントを送信する」ボタンを押してください。</p>',
	'label_submit'         => 'コメントを送信する',
);

comment_form($comments_args);
?>

コピペ。。


2015-11-10 | Posted in ブログ, ワードプレスComments Closed 

 

WordPressでRSS配信できない

WordPressでRSS feed 配信できない時は、9割

 

<link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?>
 RSS Feed" href="<?php bloginfo('rss2_url'); ?>" />

が抜けています。

 

「外観」→「ヘッダー」のhead内に入れればOKです

2013-01-29 | Posted in ブログ, ワードプレスComments Closed