This trick is really basic but is useful for automating an important information for your blog. If you have a copyright information defined anywhere in your blog with the year in it(usually present at the footer), then you might have to change the year everytime and sometimes you just forget. This information is usually hardcoded in all the themes. Here is a workaround

1) Open footer.php from the active themes folder

2) Where the year is written, suppose 2008, replace it by <?php echo date(‘Y’); ?>

3) Save the file and you are good to go.

Note: This can be used in any PHP page, not just confined to WordPress

Cheers !!

Realin !

Share this post: