How to Auto Update the Copyright Notice in WordPress

January 1st, 2010 § 0

It’s that time of year again.

Time for a little WordPress maintenance to update the copyright notice on your site.

For a lot of site owners, this means manually updating the year in your footer.php template. Not necessarily a hard or time-consuming task but you have to remember to actually do it. And if you manage more than one WordPress site, it can be quite tiresome.

So here’s a quick and painless way to have WordPress automatically update the copyright year for you. And it doesn’t require a plugin which is a nice bonus.

Just add this code (generally to your footer.php file).

Copyright <?php echo date('Y'); ?> by <a href="<?php echo get_option('home'); ?>/"><?php bloginfo('name'); ?></a> All rights reserved.

The first code snippet “echo date(‘Y’)” will automatically display the current year.

The second part will display your blog name (linked to your home page). If you don’t need the name linked, simply remove the href links.

That’s it!

Tagged: Copyright, WordPress

§ Leave a Reply