Contact Information

〒546-0043 大阪市東住吉区駒川1-7-12
電話06-6719-3085
メール withbe2002@yahoo.co.jp

Twenty Elevenでフッターをコピーライトに変えるには

footer.phpファイルの赤字の部分青字の部分のように編集する。
下の例では運営開始年度を2009年に設定しているが、必要に応じて変更すると、運営開始から今年までの年号が表示され、自動的にブログ名が挿入される。他のテーマにも利用可。

【編集前】

<?php
/**
* The template for displaying the footer.
*
* Contains the closing of the id=main div and all content after
*
* @package WordPress
* @subpackage Twenty_Eleven
* @since Twenty Eleven 1.0
*/
?>

</div><!– #main –>

<footer id=”colophon” role=”contentinfo”>

<?php
/* A sidebar in the footer? Yep. You can can customize
* your footer with three columns of widgets.
*/
if ( ! is_404() )
get_sidebar( ‘footer’ );
?>

<div id=”site-generator”>
<?php do_action( ‘twentyeleven_credits’ ); ?>
<a href=”<?php echo esc_url( __( ‘http://wordpress.org/’, ‘twentyeleven’ ) ); ?>” title=”<?php esc_attr_e( ‘Semantic Personal Publishing Platform’, ‘twentyeleven’ ); ?>” rel=”generator”><?php printf( __( ‘Proudly powered by %s’, ‘twentyeleven’ ), ‘WordPress’ ); ?></a>
</div>
</footer><!– #colophon –>
</div><!– #page –>

<?php wp_footer(); ?>

</body>
</html>

【編集後】

<?php
/**
* The template for displaying the footer.
*
* Contains the closing of the id=main div and all content after
*
* @package WordPress
* @subpackage Twenty_Eleven
* @since Twenty Eleven 1.0
*/
?>

</div><!– #main –>

<footer id=”colophon” role=”contentinfo”>

<?php
/* A sidebar in the footer? Yep. You can can customize
* your footer with three columns of widgets.
*/
if ( ! is_404() )
get_sidebar( ‘footer’ );
?>

<div id=”site-generator”>
Copyright &copy; 2009-<?php echo date(‘Y’); ?>
<?php bloginfo( ‘name’ ); ?> ALL Rights Reserved.
</div>

</footer><!– #colophon –>
</div><!– #page –>

<?php wp_footer(); ?>

</body>
</html>