How to add copyright symbol with dynamic date in wordpress footer

How to add copyright symbol with dynamic date in wordpressAre you tired of updating the copyright date each year in your wordpress site? Here is a simple code that adds copyright symbol with dynamic date in wordpress footer. By adding this snippet you don’t have to update your copyright text each year.

We have seen in many sites that contains copyright symbol only with the current year and even some sites have outdated copyright year. The best way to have copyright text is by adding copyright symbol from the year started to the current year. By doing so; your site visitors will know the age of your website.  In this article we will see how to add copyright symbol with dynamic date in wordpress footer.

How to add copyright symbol with dynamic date in wordpress footer

To add copyright symbol that updates dates automatically you can add this simple code in wordpress footer.php file. Make sure you change the year 2010 to the year started.

copyright &copy; 2010-<?php echo date('Y'); ?> <?php bloginfo('blogname'); ?>

This code adds “copyright © 2010 – 2013 yourblogname” in your wordpress footer.

The above code is not the right solution for sites that are aged less than a year. If you change the year 2010 to 2013 then it simply shows “copyright © 2013 – 2013 yourblogname” which doesn’t looks good.

If your site is less than a year then add this following code in your footer.php and not the above one.

<?php
$year = date('Y');
if ($year != 2013){
echo '© 2013 – '.$year.' YourSite.com';
} else {
echo '© 2013 YourSite.com';
}
?>

The above php code adds copyright symbol with just the current year (© 2013 yoursite.com). So if your site becomes one year old then it automatically updates like this © 2013 – 2014 yoursite.com .  Now you don’t need to update your copyright date each year.

Bonus – copyright symbol with dynamic date in wordpress footer

If you want copyright like this copyright © Mon/21/10/2013 yoursitename then add the following code in your wordpress footer.php file. This will update automatically each and every day.

copyright &copy; <?php echo date("D/d/m/Y"); ?> <?php bloginfo('blogname'); ?>

Hope this helped you on adding copyright symbol with automatic updating of years and dates in your wordpress footer. Please share and comment below. Subscribe to get the latest blog updates.