Simple PHP Solution for Dynamic Copyright Date
You would paste something like this in your theme’s functions.php file
Tables can't be imported directly. Please insert an image of your table which can be found here.
1
The problem with this issue is that you would have to add this once your site is at least one year old.
Elegant WordPress Solution for Dynamic Copyright Date
While surfing the web, we saw a more elegant solution suggested by @frumph of CompicPress Theme. They are using this function on their excellent ComicPress theme. This function will generate a dynamic copyright date based on the published date of your oldest post and your newest post. If it is the first year of your site, then this function will only display the current year.
To implement this dynamic copyright date in your WordPress footer, open your theme’s functions.php file and add the following code:
Tables can't be imported directly. Please insert an image of your table which can be found here.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
Then open your theme’s footer.php file and add the following code where you want to display the date:
Tables can't be imported directly. Please insert an image of your table which can be found here.
1
This function will add the following text:
© 2009 – 2016
Don’t keep your copyright dates outdated. Take advantage of this technique in your current and future WordPress sites.