Twenty Seventeenのフッタ表記をCopyright表示に変えたい
-
<div class="site-info"> <a href="<?php echo esc_url( __( 'https://wordpress.org/', 'twentyseventeen' ) ); ?>"><?php printf( __( 'Proudly powered by %s', 'twentyseventeen' ), 'WordPress' ); ?></a> </div>
以上に、Twenty Seventeenのフッタ表記Proudly powered by WordPress はなっているので、不要な箇所と書き換えればいいです。
ご連絡ありがとうございます。ただ、上記の表記が見当たらないです。
下記は今のfooter.phpです、これのどこを変更すればいいでしょうか?
初心者ないのでできれば詳しくお願いいたします。<?php
/**
* The template for displaying the footer
*
* Contains the closing of the #content div and all content after.
*
* @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
*
* @package WordPress
* @subpackage Twenty_Seventeen
* @since 1.0
* @version 1.0
*/?>
</div><!– #content –>
<footer id=”colophon” class=”site-footer” role=”contentinfo”>
<div class=”wrap”>
<?php
get_template_part( ‘template-parts/footer/footer’, ‘widgets’ );if ( has_nav_menu( ‘social’ ) ) : ?>
<nav class=”social-navigation” role=”navigation” aria-label=”<?php _e( ‘Footer Social Links Menu’, ‘twentyseventeen’ ); ?>”>
<?php
wp_nav_menu( array(
‘theme_location’ => ‘social’,
‘menu_class’ => ‘social-links-menu’,
‘depth’ => 1,
‘link_before’ => ‘<span class=”screen-reader-text”>’,
‘link_after’ => ‘</span>’ . twentyseventeen_get_svg( array( ‘icon’ => ‘chain’ ) ),
) );
?>
</nav><!– .social-navigation –>
<?php endif;get_template_part( ‘template-parts/footer/site’, ‘info’ );
?>
</div><!– .wrap –>
</footer><!– #colophon –>
</div><!– .site-content-contain –>
</div><!– #page –>
<?php wp_footer(); ?></body>
</html>WordPress のプログラムの特徴は、子テーマの中を探して見つからないと、親テーマを探しに行きますよね。
実際にテーマを探してるのはlocate_template()という関数で、get_template_partはそれに渡すためのファイルの配列を用意しています。
つまり子テーマのディレクトリに現在のフッターの表示を改めたいファイルを置くと、処理も早いということですね。親テーマを直接編集すると、テーマアップデート時に変更が消えますね。
このあたりのスライドがわかりやすいかと思いますので、作業前に確認してみてください。
wp-content>themes>twentyseventeen>template-parts>footer>site-info.php を開けば中にありますよ。
色々とありがとうございます、ftpでsite-info.phpを開けました。
<div class=”site-info”>
“><?php printf( __( ‘Proudly powered by %s’, ‘twentyseventeen’ ), ‘WordPress’ ); ?>
</div><!– .site-info –>1)上記をどう変えればいいのでしょうか?
2)これは一度site-info.phpをダウンロードして開けましたが、変えたもので戻すにはどうすればいいのでしょうか?本当に初心者で、、、すみません、、アドバイス願います。
宜しくお願い致します。どう変えれば良いのかは、わたしの知るところではありません。
<div class="site-info"> <a href="<?php echo esc_url( __( 'https://wordpress.org/', 'twentyseventeen' ) ); ?>"><?php printf( __( 'Proudly powered by %s', 'twentyseventeen' ), 'WordPress' ); ?></a> </div>
この記述でTwenty Seventeenのフッタ表記Proudly powered by WordPressを創りだしています。
- トピック「Twenty Seventeenのフッタ表記をCopyright表示に変えたい」には新たに返信することはできません。