Select Page

You don’t have to update the year in your copyright text in your theme’s footer. You can use a simple PHP function called date to automatically output the current year.

Add this code to your footer.php file to dynamically update the year in your copyright text. Your theme’s footer.php might already have copyright text. If it does, replace the original text with the below code:

<div id='copyright-text'>
	<strong>Copyright © <?php echo date('Y'); ?></strong> <a href="<?php bloginfo('url'); ?>"><?php bloginfo('name'); ?></a>. All Rights Reserved.

Place the above code in your theme’s footer.php file where you want to display the copyright text. The above code calls the PHP date function with ‘Y’ argument which displays the full year.