Custom WordPress shortcode to display current year

Place this code in your theme’s functions.php file to address that pesky problem of copyright dates in the footer not having the current year displayed!! /* shortcode for the current year */ function year_shortcode() { $year = date(‘Y’); return...

Use PHP’s date function to keep your Copyright date current

Nothing screams “THIS WEBSITE HASN’T BEEN UPDATED IN A WHILE” like an out-of-date copyright notice in your footer. Several years ago, I decided to code a little smarter, and on every website that I’m responsible for, I insert a PHP snippet that displays the current...