Archived topic
Display current year on a page / post
5 replies · Started by KEVIN on June 25, 2020
Hi,
I have seen that i can add the current year on the copyright area. Which is really cool.
But i would like to use this awesome function on my pages / posts. And also on Generatepress element (for my H1 for exemple)
How can i do ?
Thank you
Hi there,
Leo provides a PHP Snippet to create your own current year shortcode:
https://generatepress.com/forums/topic/footer-bar-multiple-widgets-how-to-align-them/#post-802625
Thanks but where did i put my PHP code ? Do I need to create a child theme and put it in the function.php?
Code snippets plugin is the easiest:
Adding PHP: https://docs.generatepress.com/article/adding-php/
Thanks Leo. I will have a look at the article :)
I'm not looking for the easiest things to do, but the most efficient way. I don't want to add to much plugins only for one or two line of code. ^^ I'm looking for really short loading time, that's why i chose generatepress theme. Which is awesome by the way :)
Thanks again
No problem :)