Country Living

You just never know what I’ll be up to around here. I could be quilting one day and building a barn the next. I just love living on our 10 acres with our heapin’ mess of critters.

Down Home Cooking

Cooking is really the first social networking activity humans ever learned. I love simple, good tasting, home cooked food (if it’s healthy that’s a perk!). Pull up a stool to the counter and sip some coffee while we whip up some supper together.

Family Life

Family is what life is all about. No one is going to leave this earth and wish they had spent more time at work. Some simple things to enhance your family life. “Try it, you’ll like it.”

The Moxie Mom

One of the joys of my life is getting to be a stay-at-home mom. I am so blessed to have a husband who supports me in this endeavor of raising our children. We have fun with homeschooling, 4-H, church, our farm/ranch/zoo and love living in Texas.

WordPress

My favorite blogging platform is WordPress.org. There are just so many possibilities. Want some “how-to” in layman’s terms? See some of my favorite tips, tweaks, plugins and themes that WordPress has to offer while avoiding some pitfalls.

Home » Headline, WordPress

Ready to Automatically Update Your Copyright Date?

Submitted by Wendy Merritt on Monday, 5 January 20092 Comments

automate your copyright noticeHow 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!



The Moxie Mom Blog!
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.

followmeontwitter Ready to Automatically Update Your Copyright Date? 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.The Moxie Mom Blog RSS feed

Popularity: 20% [?]

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • FriendFeed
  • LinkedIn
  • Live
  • MySpace
  • Ping.fm
  • Reddit
  • StumbleUpon
  • Technorati
  • Twitter
  • Yahoo! Buzz
  • Print

Related Posts



1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5.00 out of 5)
Loading ... Loading ...



2 Comments »

What are your thoughts?

You must be logged in to post a comment.