Archived topic
Post update date
11 replies · Started by Philippe on May 30, 2022
Hi,
I'd like to have the last update date appear on my posts.
I used the following css: add_filter( 'generate_post_date_show_updated_only', '__return_true' );
Nada
Post original dates never showed on my website either (onehomeplanet.com)
Thanks for your help.
Hi there,
Can you try the CSS here?
https://docs.generatepress.com/article/show-the-updated-post-date/
Great, it works.
I was assuming that the date would appear on the posts themselves, not just on the excerpts on the homepage. I can do without, though.
Side question: I have always wondered if css code could go in php files and reversely. Can they? If not, what is the difference in functionality between the two?
I was assuming that the date would appear on the posts themselves, not just on the excerpts on the homepage. I can do without, though.
Are they set to display for single posts in the customizer?
https://docs.generatepress.com/article/blog-content-layout/#single
Side question: I have always wondered if css code could go in php files and reversely. Can they? If not, what is the difference in functionality between the two?
CSS and PHP are completely two different coding languages. They should be added separately:
Adding PHP: https://docs.generatepress.com/article/adding-php/
Adding CSS: https://docs.generatepress.com/article/adding-css/
Are they set to display for single posts in the customizer?
Yes
Can you link us to a post?
Hi Philippe,
Thank you for sharing the link!
I can’t seem to locate the HTML elements that should show the date when it is set to appear on Single Posts in the Customizer.
To clarify once more, can you kindly check if “Display post date” is enabled in Appearance > Customize > Layout > Blog > Single as such: https://share.getcloudapp.com/BluG0bPb
If it is, can you try clearing all caching mechanisms set in your website?
Kindly let us know how it goes.
I just emptied the cache and now the last update appears on single posts. All good!
Glad it’s working now Philippe!
Thank you, Fernando!
You're welcome Philippe!