Fix Your Copyright Line

You’ve got a nice looking website with fresh content.  But the footer says 2011.  Here’s how to fix that – and keep it fixed.

On most sites, the copyright notice is in some static footer text, instead of a widget or post – which means it’s not meant to be updated frequently.  And since it should always reflect the current year, why not have it update itself automatically?

If you’re using WordPress, go into your theme editor and find footer.php or something along those lines.  Find the part that says © 2011 and replace it with a little bit of PHP to pull the current year:

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

The capital Y specifies that you want the current four-digit year.  Remember to put a space between that code and your name.  Presto, no more updating, no more outdated copyright notice!

Leave a Reply