Happy New Year people of the internets!
With a new year comes lots of ideas, resolutions, and changes.
The copyright year on your website isn’t something that typically makes the important to-do list each January, because, who really wants to change a number when there are lots more exciting things to do instead?
How about if I showed you how to automagically update your website copyright year in this WordPress tutorial?
All you need to do is add the following code to your footer.php file in your Child Theme.
© Your Company Name <!--?php echo date("Y"); ?-->
Don’t have a footer.php in your child theme yet? Follow these steps:
- Find your parent theme’s footer.php file
- Make a copy of the footer.php file and save it in your child theme directory
- Paste the code wherever you want the website copyright year to dynamically update
- Save the file and upload it to the child theme directory on your server.
WordPress Codex: All about child themes
Update your footer: If you wanna get a little more fancy with your code