Archived topic
How do I show "Dynamic Current Date" instead of "Published Date" in post meta
5 replies · Started by Ritesh Saini on November 15, 2019
Currently, my blog shows published date in the post meta. Is there any way to dynamically change the date daily to the current date?
Hi there,
You can add this PHP snippet to create a shortcode to display current date:
https://generatepress.com/forums/topic/changing-the-copyright-message-full-date/#post-617442
Then add the shortcode in after_entry_title hook with hooks elements:
https://docs.generatepress.com/article/hooks-element-overview/
Make sure to check execute shortcode.
Hello,
That worked fine. But it is showing up as an additional date below the published date instead of overriding it. I want the dynamic date to show up in the place of the published date.
Can you try disabling the publish date here?
https://docs.generatepress.com/article/blog-content-layout/#single
Yeah, that worked! Thank you :)
Just needed to add style from default entry meta date to the dynamic date after that to blend it with the theme.
Awesome :)