It is easy to forget to update the copyright notice on your website or blog every year. Fortunately, you don’t have to. Instead, you can use this bit of PHP:

&copy; <?php echo date('Y'); ?>

Here is what this will look like on your website:

© 2013

(The code will output the current year, not 2013, if you happen to be looking at this in another year.)

Or, if you prefer, you can modify this to show a range from the beginning of your website to the current year:

&copy; 2000–<?php echo date('Y'); ?>

Here is how that will look:

© 2000–2013

Add a Copyright Notice to Your WordPress Theme

If you are building a WordPress theme, you can add the above code directly to your footer.php file, or you can add it to your theme’s functions.php file. If you go with functions.php, here is the code to use:

function copyright_notice() {
  echo '<p>&copy; ' . date('Y') . '</p>';
add_action( 'wp_footer', 'copyright_notice' );

Or if you want it to show up as a range:

function copyright_notice() {
  echo '<p>&copy; 2000–' . date('Y') . '</p>';
add_action( 'wp_footer', 'copyright_notice' );

That’s it—never worry about updating your copyright notice again!

Leave a Reply

Client Login