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.

One thought on “Add a Changing Copyright Date to Your WordPress Theme

  1. Wow, I just tried it. Copy, paste, save, refresh — and done! How easy was that? Thank you! I’m so *tired* of changing the date every year. You have some great little tips in here; think I’m gonna bookmark this for future reference!

    Thanks,
    Cindy
    Rocky Mountain Education Connection Friendly, inclusive homeschooling information for the Rocky Mountain west.