Update your WordPress copyright date automatically

Three months into the new year and I’m still coming across several websites that I manage that are still showing a copyright for last year.

DOH!

It’s easy to forget as the calendar rolls over to update all your copyright (or Creative Commons) tags on your websites, so why not automate it?

Simply replace the latest year (i.e. © 2005-2010 Jonathan D. Blundell) with this simple code:

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

So you’re resulting copyright line will look like this:

&copy; 2005-<?php echo date('Y'); ?> Jonathan D. Blundell

And every year, your copyright statement will update with the current year.

Easy peasy!

Now I just need to go update this in all my footers… DOH!