Avoid Hardcoding Your Copyright Information

How many of you still update your themes footer every year to change the copyright date? Thanks to a small snippet of code, you can add this to your footer.php file which will negate the need to manually change the copyright information every year. The code snippet is php the_time(‘Y’) An excellent primer for how to use this snippet within the footer.php file is explained via Lorelle VanFossen.


13 responses to “Avoid Hardcoding Your Copyright Information”

  1. Thanks for the post.

    Over at UnitedWayofEastCentralIowa.org we use widgets to be able to easily update things.

    We actually moved to a Creative Commons license vs. an ALL RIGHTS RESERVED. We want others to share our content…. Just properly give us credit. How do others feel about that?


  2. <?php the_time('Y') would ouput the year of post/page currently being viewed, which is obviously not at all what you want. Instead you should use the date() function, like so: <?php date('Y')

    I'll comment on Laurelle's post as well

  3. I generally avoid using the year in copyright notices. It is not really necessary, especially for personal or non-commercial work.

    (Disclaimer: all this stuff is specific to US copyright law. Anyone from other countries: sorry! Also, it should go without saying, IANAL.)

    The copyright date helps establish, at a glance, when the work was published, so that you can then figure out when the copyright on that work expires. Back when copyright only used to last 28 years, this was handy. Now, however, copyright automatically lasts for the entire life of the author plus some additional years (I forget how many, it’s a bit).

    So, unless you’re concerned with being able to pin down the exact date your blog’s contents pass out of copyright after your death (maybe you have plans to be a copyright enforcing ghost?), having the year in your copyright statement is kind of superfluous.

    Having the year posted might be handy if you regularly register your work with the copyright office – if you ever get into a dispute with someone over use of your content, you’ll be able to pin down the date it was registered so that you can sue for greater damages. Again, that’s why I think it might be more useful for corporate-related stuff, and less so for personal use.

    Not having the year there doesn’t hurt your copyright claim in any way (in fact, technically you do not need a copyright statement at all; you get copyright automatically), and I personally just like the simplicity of a smaller, shorter copyright statement. Also, I like not having to update the year (because I’m lazy) – although obviously in some cases you can have it update automatically, but in others you can’t.

    Anyway, that’s just my opinion – sorry for the length; I just sort of have a pet peeve about this sort of thing.

  4. I’ve been doing this for ages now i.e. the echo date(‘Y’);. It’s so obvious to do so since the years change, like it happened last night :)

  5. There really isn’t any excuse for adding static date in your footer any more, it’s just so easy to add one via PHP.

    We try to make it additionally easy for our theme users to add the current year. You just need to edit a textbox in theme options to customize the copyright message/footer links, and simply add in the [year] shortcode anywhere you want it to appear.

    This shortcode can also be used across all posts/pages/widgets if needed too, without the user having to enter PHP directly.

  6. Putting only the current year on a copyright notice makes the site look like it isn’t established.

    So I always make sure it is the launch year and then the current year.

    If they are different, it is easy, but if not, just a bit more code to do it.

    Looks much better than a 2012 copyright only and better than just an old number.

    Copyright 1999-2012 by Me.

  7. Why do you want the date to be recent? Copyrights should be the oldest date possible to protect your work. For example, if your blog started in 2010 you’d want that as the copyright date.

    The copyright is the time that you’ve established your rights to the material.

    Alternatively, something like “Contents copyright 2010 to 2012” with the 2nd date being generated dynamically might be appropriate.

  8. We split the difference:

    1) Put the year a post was published at the bottom of the post (not in the footer per se), and;
    2) Put 2009-current year (via PHP code) in the footer. (2009 is when we were established)

    Example here.

    I think there’s no right answer here, but that’s what we do.

  9. Good information for developers of course, but for us simple minded users who use other peoples themes, won’t this fix be rendered moot each time the theme developer updates the theme? Perhaps WordPress should have the forethought to include something like this in the core since it seems so very intuitive. Maybe you can mention it to your buddy Matt?


Subscribe Via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

%d bloggers like this: