前回はWordPressのテーマTwentyTwelveのヘッダーのカスタマイズについて説明しました。今回はフッター部分のカスタマイズについて、ご紹介したいと思います。デフォルトでは、”Proudly powered by WordPress”と表示されますので、これをカスタマイズしていきます。
今回のカスタマイズでは、以下の様に変更しています。
©2013 (ブログのタイトル) all right reserved.
これがオリジナルのfooter.phoファイルです。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
<?php /** * The template for displaying the footer. * * Contains footer content and the closing of the * #main and #page div elements. * * @package WordPress * @subpackage Twenty_Twelve * @since Twenty Twelve 1.0 */ ?> </div><!-- #main .wrapper --> <footer id="colophon" role="contentinfo"> <div class="site-info"> <?php do_action( 'twentytwelve_credits' ); ?> <a href="<?php echo esc_url( __( 'http://wordpress.org/', 'twentytwelve' ) ); ?>" title="<?php esc_attr_e( 'Semantic Personal Publishing Platform', 'twentytwelve' ); ?>"><?php printf( __( 'Proudly powered by %s', 'twentytwelve' ), 'WordPress' ); ?></a> </div><!-- .site-info --> </footer><!-- #colophon --> </div><!-- #page --> <?php wp_footer(); ?> </body> </html> |
16、17行目が変更すべき箇所ですので、以下のように変更します。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
<?php /** * The template for displaying the footer. * * Contains footer content and the closing of the * #main and #page div elements. * * @package WordPress * @subpackage Twenty_Twelve * @since Twenty Twelve 1.0 */ ?> </div><!-- #main .wrapper --> <footer id="colophon" role="contentinfo"> <div class="site-info"> <p>© <?php echo date('Y '); bloginfo('name'); ?> all rights reserved. </p> </div><!-- .site-info --> </footer><!-- #colophon --> </div><!-- #page --> <?php wp_footer(); ?> </body> </html> |
上記は一例ですが、相当する箇所を変更する事で、目的にあったフッター文章に変更する事ができます。
Sponsored Link