Archived topic
Published date Vs Updated Date
11 replies · Started by HT on August 30, 2021
I'm looking for an option to show the updated date of the post instead of the published date ... is it possible GP theme? Thanks a lot in advance.
Hi there,
this doc provides the PHP snippet to do that:
https://docs.generatepress.com/article/generate_post_date_show_updated_only/
Hopefully, this shows the published date if there is no update after publishing the post?
Also, do you have any guide to implementing this filter ..
If there is no updated date, it will display the published date.
This article explains adding PHP:
It works ok but it displays the following format - 30 Aug 2021.
However, I was looking for something like -> Last Updated: 30 Aug 2021 or Published: 30 Aug 2021
Is there any tip for the same?
Hi there,
Try this CSS:
.inside-article .posted-on .updated-date:before{
content: "Last Updated: ";
}
.inside-article .posted-on .published:before {
content: "Published:";
}
Should I remove the PHP?
No, the PHP should be kept.
It worked for Published one ..but not working for Last Updated On is not working ...
I've updated the CSS here:
https://generatepress.com/forums/topic/published-date-vs-updated-date/#post-1913092
Let me know :)
Looks good now. Thank you
You are welcome :)