WordPress(responsive) のトップページの画像変更

wordpress の作法をよく知らないまま行っていますので,当てにしないで下さい.
単なる作業記録です.

responsive のトップページの画像を変更したかったけど,管理画面にはそのような項目がなかったので,直接ソースをいじりました.

まず,画像のファイル名は featured-image.png ですので,それでgrep.

grep "featured-image.png" * -R
themes/responsive/core/includes/theme-options/theme-options.php:
'placeholder' => "<img class='aligncenter' src='" . get_template_directory_uri() . "'/core/images/featured-image.png' width='440' height='300' alt='' />"
themes/responsive/changelog.txt:[*] featured-image.png
themes/responsive/changelog.txt:[*] featured-image.png
themes/responsive/template-parts/featured-area.php:
<?php $featured_content = ( !empty( $responsive_options['featured_content'] ) ) ? $responsive_options['featured_content'] : '<img class="aligncenter" src="' . get_template_directory_uri() . '/core/images/featured-image.png" width="440" height="300" alt="" />'; ?>

とのことなので,var/www/html/wp/wp-content/themes/responsive/core/images に画像ファイルを置いて,該当するtheme-options.phpと,featured-area.phpの二カ所を直接書き換えました.

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です

*