Automatically Update WordPress Copyright Year

Posted By: Mike
Date Posted: Sunday 4th September 2011
Automatically Update WordPress Copyright Year

Depending on the theme that you are using for WordPress you may already have the year automatically update. Whether this is hardcoded into your theme or by using the theme functions in admin to make the change.
For many bloggers and corporate sites they simply forget to update this OR more frequently, simply dont know how to do this because its hard coded in the footer.php file.

 

This simple tip will allow you to pull in the current date and add it to your WordPress theme site footer.

 

Before you make any changes its always advisable to make a backup copy of any files before you make changes in case you break your theme, although for such a simple change its highly unlikely!

 

Simply add the following code to your footer.php file which is located in your current theme directory (or replace current date code) with the one below:

 

<?php echo date(‘Y’); ?>

 

Now your copyright year will automatically update every year!

Leave your response!

Add your comment below, or trackback from your own site. You can also subscribe to these comments via RSS.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

This is a Gravatar-enabled weblog. To get your own globally-recognized-avatar, please register at Gravatar.