Ready to Automatically Update Your Copyright Date?
How many of you have remember to update your copyright year on your blog? It is such a small thing that is easy to forget to do…until a reader points it out. Ouch!
Today I encountered such an occasion. I don’t want to have to remember to do this mundane task every year so I installed a small javascript to handle this function for me.
Whether you display the start date of your webpage or blog is entirely up to you. It might look something like this:
Copyright © 2003-2009 or Copyright © 2009
Many blog platforms have this funtion already installed using a simple PHP like:
2004-< ?php echo date('Y'); ?>– this would produce Copyright 2004-2009, and change to 2010 automatically next year.
This can also be done using a simple to apply javascript placed in the footer or anywhere you wish on your website or blog. This is what I used to accomplish the notice at the footer of this blog.
Copyright © 2006 <script language="JavaScript">var d=new Date();yr=d.getFullYear();if (yr!=2006)document.write("- "+yr);</script>
Replace the 2006 in both places with the year you would like to set as the publishing start year and then the script will take care of the rest for you. So for me it’s 2006 and looks like this Copyright © 2006 – 2009. Again, this will change to 2010 next year at this time without any effort on my part.
I am sure there a other ways to get this job done. But this was the easiest way and it worked!
Like this blog post? buy me a coffee or send me a tip!
If I can do it! You can do it too! Celebrating Texas country living, down home cooking, family life, figuring stuff out and being a stay-at-home moxie mom computer geek.
Blessings,
Wendy Merritt
The Moxie Mom
XXO (A kiss on each cheek and a hug)
If you enjoyed this article get updates via my RSS feed.

Popularity: 20% [?]






























[...] a very simple trick for WordPress users to make sure that the date is automatically updated, making it the last time you ever have to [...]
[...] a very simple trick for WordPress users to make sure that the date is automatically updated, making it the last time [...]