Auto-Updating Copyright Year

Using the_date(); this is very easy to achieve, all you need is  © to get yourself setup. To take it a step further, you can include a date span, so your clients are aware of just how long you’ve been burning the midnight oil.

<p>&copy; 2013 <?php date('Y') == "2012" ? $year = "" : $year = "- ".date('Y'); echo $year; ?></p>

Sourced here.

Leave a Reply

Posted in php
katherine as a flat graphic icon

About Me

I’m an African / Ojibwe First Nations Web Developer living in Winnipeg, Manitoba.

Visit the Tips and Blog to see what I’m working on.