Automatic Copyright Date

Tips & Tricks: Friday, October 5th, 2007

It’s already October, that means only a few more months and it will be 2008. Many sites will go long into the new year with the copyright in their footer still reading 2007 (maybe even an earlier year). You don’t have to be one of those people. With a simple bit of PHP code you can have your copyright disclaimer line grab the current year.

Let’s say you started your comic or website in 2001 and you want it to read like this in your footer:

©2001-2007 Me.

You would use the following code:

&#169;2001-<?php echo date('Y'); ?> Me.

When 2008 comes, the 2007 will automatically change to 2008 for you. Now just swap out the start date and the name and get it on your own site… and fuggettubattit.

Share This

9 Responses to “Automatic Copyright Date”

  1. Chad T Says:

    Woot….added this to the code. these little tips you put here make building a site fun for me again, thank you. Could you please post topics on adding ads and banners to a site?

    Anyway someday soon I will launch my comic site. take care.

  2. Albone Says:

    Did it, love it. Thanks a lot for the great tip and for all that you do.

  3. Michael Buckley Says:

    I’m sorry…but I’ve only just installed WP for the first time. I’d like to try this, but I’m not sure where to add it?

    in the function.php file?

  4. Chad T Says:

    Michael Just goto the “Download” section and read the “documentation”. do this only after you have wordpress up and running. It does get a bit confusing if you are not used to doing this stuff, but work your way through it and don’t be afraid to blow things up. how else will you learn?

    Also if you need help, goto the forum and ask questions there.

  5. Les McClaine Says:

    I did the same thing with

  6. Les McClaine Says:

    Shoot, the code disappeared. I used print(date(Y)) inside the php framework.

  7. Danny Burleson Says:

    Wow! That’s handy! I now have saved 1 extra minute per year, so with the 2-4 hours it takes me to finish a comic, in 200+ years I’ll be ahead.

    But seriously, thanks for the code. I’d forget until like March.

  8. Griffin Says:

    I actually really like this idea. :D Theoretically it could also save you a legal headache for not declaring your copyright for every year, but that would depend more on your location. If something like that happened, it would waste a lot more than one minute.

    I actually use this code for WP themes:

    This is of course just the year portion. ^_^

    ~Griffin

    PS: You can usually find where to add this under Presentation >> Theme Editor >> Footer.

  9. Sean Says:

    Just make sure, if you are going to use this, that you have new content for 2008 (or whatever the year might be). It would be improper to claim a copyright into 2008 if all you are doing is hosting art created in 2007 or earlier. This is always something that comes up with clients I do sites for, and I remind them that if the site hasn’t changed since 2007 when it first goes up, then there is no copyright to claim, so I tend to keep the date manual unless its a site that updates frequently.

Leave a Reply



Close
E-mail It