This instructional exercise is composed for those of you who end up neglecting to refresh the year in your site’s copyright line. I’ve seen a few destinations with copyright lines that are more than five years obsolete. We should investigate how you can set your site’s footer to dependably show the present year in the copyright line.
Where do I find my copyright date in WordPress?
In most cases, you will find this in your theme’s
footer.php file. If you are using a child theme (you should be), you will first want to look for the file within your child theme
In the most recent WordPress default Twenty Seventeen theme, you will be editing.
Once you have identified the proper file to edit, open it and look for the text from your footer’s copyright line. In Twenty Seventeen as well as many other themes, this is found within a div with the class “site-info”.
Now that we know where to make the changes, let’s update it to display a dynamic copyright line.
How to display the current year in the copyright line using PHP
To get the current year in PHP we can use:
Keep in mind that this returns the date from the server.
Now you can get back to focusing on celebrating the new year instead of worrying about your copyright date! No more updates needed — your footer copyright will always display the current year!