Dynamic Copyright Year In Your Footer

The new year is already some days old but in many websites you still can see in their footer “copyright © 2006-2008 mysite.com”. Yeah Andy, on your blog too 😉

For everyone, who changes the year in their footer manually every year, here is a little tip:

<p>copyright © 2006-<?php echo date('Y'); ?> mysite.com</p>

With date(‘Y’) the year from the current date get pulled and you never have to take care about it, unless you change your theme again.

Comments are closed.

9 comments

  1. David Hellmann

    simple but good 🙂 i use it now!

  2. fwolf

    well well .. if you want to do it right, you have to go one step further:

    (C) Copyright $strCopyrightBegin) {
    echo ' - ' . date('Y');
    } ?> by John Doe, all rights reserved.

  3. Marvin

    cool. built it in 😉

  4. Daniele

    Great tip! Just implemented in the WP theme I'm working on

  5. Alex

    Welcome guys 🙂 and thanks for the right solution fwolf 😉

  6. Erwin

    Now that's a handy trick! Just went through all the copyright notices... luckily the last time for my WP sites. Glad that someone uses his brain 🙂

  7. Christopher Ross

    I have a nifty little plugin WordPress Plugin to Automatically Update the Copyright Notice. that will automatically increase the copyright details based on the posts in your blog as well.

    It works by finding the first and last dates from the posts and changes your footer accordingly. I've also posted the code for those who prefer working without plugins.

  8. Michael

    Christopher, nice one 🙂

  9. Len

    I've been looking for this for some time now! Sites with old copyright years are somehow a bit of a turn off.