Happy New Year!
New Year’s is often a time for “stock-taking”. For looking at what is working well for your business and what changes or improvements you can make for the year ahead. When the calendar changes to a New Year it is good to take a look at your website with a critical eye.
One thing that you shouldn’t overlook is the copyright date. A current copyright date tells visitors that your site is actively maintained. You may need to update the copyright date in your site’s footer file. Open the footer.php file in your WordPress theme to edit the date.
Are you wondering, “how can I set the copyright date on my WordPress site to update automatically?”
Since you don’t want to have to do this manually every year, enter the following code to automate this task and ensure that your site will always appear up-to-date.
This code will display as © 2012 Your site name as a link to the homepage.
@copy; <?php echo date('Y'); ?> <a href="<?php echo home_url( '/' ) ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"> <?php bloginfo( 'name' ); ?></a>
You can also add the first year of your site with a dash after the copyright symbol. Such as © 2011-2012
@copy; 2011-<?php echo date('Y'); ?> <a href="<?php echo home_url( '/' ) ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"> <?php bloginfo( 'name' ); ?></a>
I hope you find this tip helpful as you prepare your website for 2012 and beyond.
3 thoughts on “How to Set the Copyright Date of your WordPress Theme to Automatically Update”
Thanks for the tip. This is another way to demonstrate your expertise and longevity on the web.
I’ve written a short snippet which is an improvement over this, as it supports date ranges, so all you enter is the start date, and then it will display it as just that year, or that year to the current one if applicable
Check it out at: LINK REMOVED AS GAVE 404 Error
Instead of this I would prefer using plugins like Automatic Copyrights Shortcode as it is easier to stay updated.
Comments are closed.