Categories Menu

Posted on Dec 13, 2014 in Blog, Tips, Wordpress | 0 comments

How to Use PHP for the Copyright Year

One of my standard “tricks” on a website is to add a dynamic snippet of code to automatically post the present year.  Whether it is simply Copyright 2014 or a range, this code is super easy.  It is PHP, so it needs to be on a .php parsed file.  This includes most WordPress “footer.php” files.

&copy; 2010 - <?php echo date("Y") ?>

If the year is 2014, it would display as

© 2010 – 2014

Simple, effective 🙂

PS – Please, PLEASE, never “© Copyright”… pick one or the other or it is kinda completely redundant.

Post a Reply

Your email address will not be published. Required fields are marked *