New year, time to go through all your websites and blogs and update the copyright date that you placed in the footer, right?
Not if you were smart and developed your site so it updates automatically.
Solution
PHP and WordPress can update your copyright year automatically.
Just place this code where you want the year to appear and voila, your year will change to 2009 (and will update automatically for years to come).
<?php echo date('Y'); ?>Admittedly I hadn’t done this myself until today ;)
Don’t use the_time
I seen a couple of solutions using the_time tag in WordPress, but this only displays the year of the last blog post in the_loop.
Want to read more?
- Barcamp Belfast: The 7 Deadly Sins of WordPress
- Redesigning WebDesignire – a showcase of Irish web design
- Guest Post: 8 Tips To Design a Charity Website
Psst! We're hiring an Interaction Designer at Kareo. Click here if interested.

Harry Roberts says:
Old news ;)
http://csswizardry.com/index.php?2008/07/30/21/30/19-six-useful-tips-for-improving-development-efficiency/
Nah, it is very useful – this is the first year I actually used it too.
THEODIN says:
Its always the simple things that trip us up! Thanks for the post!!
preaxz says:
Well, it hink it would be better if it said
Copyright 200X-2009 … :)
anyway, have you see studiopress.com .. well, how do you think?
preaxz says:
Well, it hink it would be better if it said
Copyright 200X-2009 … :)
Josh Drake says:
I just wrote a post similar to this on my own blog! You can check it out at this link:
http://www.tutorialwow.com/articles/34-websites-that-are-still-in-2008/
Great minds think alike. ;)
preaxz says:
Hmm.. i got inspiration all of the sudden. What if we put some conditional tags to show copyright date, which is probably useful for post that really is posted on 2008 …
Damian Gostomski says:
I’ve written a short snippet which is an improvement over this, as it supports date ranges, so all you enter is the start date, and then it will display it as just that year, or that year to the current one if applicable
Check it out at http://www.gostomski.co.uk/snippet/better-auto-updating-copyright-date