Tutorials, Tools and Resources for Blogger and WordPress

How to auto-update the year in your footer

Cute Amazom Box

Instead of manually updating the year in the footer.php of your WordPress blog every time a new year comes, you can make it update itself automatically by using this bit of code:

<?php echo date('Y'); ?>

Just add the code in place of the year and it will display the current year.

Example:

&copy; <?php echo date('Y'); ?> Mad Tomato

This will display “© 2011 Mad Tomato”

Get updates delivered straight to your inbox!

Enter your email address:

One comment

  1. Informative content, thanks for sharing it!!!!!!!!!!!!!!!!!!!!!!!!

Leave a Reply