Keep copyright up to date

At the footer of many webpages you will find the line

Copyright “YEAR” Company Name


Copyright “YEAR” – “YEAR” Company Name

and more than once you will find these years are incorrect.

With just a few lines of code in your footer.php file, you can keep the copyrights up to date automatically.

<div class="site-info">
     $startYear = 2013; //replace with your own value
     $currentYear = date("Y");
     if ( $startYear == $currentYear ) {
       $yearString = $startYear; 
     } else {
       $yearString = $startYear . ' - ' . $currentYear; 
     echo "Copyright $yearString Company Name"; 
</div><!-- .site-info -->
link-to-php-article Image for Shopp WordPress bestfriends article Image for Shopp is slow article shopp-webshop-homepage