Home » How To

Add a Changing Copyright Date to Your WordPress Theme

If you have a theme that displays a copyright (and you should), one annoying problem occurs every year – the copyright date needs to be updated.

Start your blog in 2008 for example, and it needs to be changed to 2007-2008, and now 2007-2009.

Of course, for a “dead” blog this isn’t a problem – but for those of us blogging regularly, the copyright DOES change, and increases each year.

So how can you make it automatic?

Find the part of your theme that displays the copyright year, usually footer.php. Here’s an example (© is the HTML code for the copyright symbol ©):

Copyright © 2007

Change it to:

Copyright &copy; 2007-<?php echo date('Y'); ?>

Now you’ll get a date range, based on the current year, and increasing each year – in this case, 2007-2009, then 2007-2010, 2007-2011, etc.

Quick and easy – and provides a little extra copyright information for your blog.

Digg this! Add to del.icio.us! Stumble this! Add to Techorati! Share on Facebook! Seed Newsvine! Reddit! Add to Yahoo!

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.