Changing the year in your footer dynamically

Published on: 24 December 2011 by gijsvogels with 2 Comments in Manuals

There is a good chance you display your year in your footer. Maybe you have a ton of client sites and changing the copyright year on every single website you own is not a very nice job to handle. So in this article I will explain to you how you can change your copyright year in your footer dynamically. As you can see I also have a copyright year in my footer:

 

Making it work

It’s very easy to make this work. If you’re working within WordPress, you’ll need to access the footer.php file. In that file you need to write your copyright line, such as: ‘Copyright © 2011 Your blog’. But instead of the just typing the year in we are going to replace that with a little php code. This is what the final result looks like:

<p>Copyright &copy; <?php echo date("Y") ?> Your blog.</p>

It’s as easy as that. Now you never have to change one line of copyright code, ever.

 

Last but not least…

I want to wish you all a Merry Christmas and a Happy New Year! I hope you will have a great time with your family and friends.

 
If you have any ideas or improvements about this subject, leave a comment!

2 Comments on Changing the year in your footer dynamically

  1. Alleyan says:

    There’s a lot of info. I’ll be back again.

  2. Thank you very much for that great article

Leave a Comment