- This topic has 10 replies, 4 voices, and was last updated 1 year, 9 months ago by
Elvin.
-
AuthorPosts
-
February 28, 2019 at 11:23 pm #825233
Uwe
Hello,
As the title describes, I’m trying to display “last updated” date instead of “published” date for all my blog posts.
I tried the following CSS but it didn’t work, unfortunately:
.posted-on .updated { display: inline-block; } .posted-on .updated + .entry-date { display: none; } .posted-on .updated:before { content: "Last Updated"; }
GP Premium 1.7.8March 1, 2019 at 1:29 am #825319David
StaffCustomer SupportHi there,
try this:
.page-hero time.updated { display: inline; } .page-hero time.published { display: none; }
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/March 1, 2019 at 12:53 pm #825966Uwe
Worked, thanks!
March 1, 2019 at 3:23 pm #826059David
StaffCustomer SupportYou’re welcome
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/January 29, 2020 at 11:29 pm #1148917rajkumarsm
Hi David,
I have added above CSS under Appearance – Simple CSS. But no luck. Do I need to modify functions file. If so what code I need to add. Please help.
Here is my site link Software Testing Material
Thanks.January 30, 2020 at 12:34 am #1148955Suraj Katwal
Hi Sumasri,
You can also try this method to show last updated date in your GeneratePress Theme ==>How to Display Last Updated Date in GeneratePress Theme?SEO, WordPress Optimization, Blogging Tutorials.
GeneratePress Tutorial: https://www.wplogout.comJanuary 30, 2020 at 3:12 am #1149064David
StaffCustomer SupportHi there,
you’ll find the CSS method required here:
https://docs.generatepress.com/article/show-the-updated-post-date/
The alternative is to use PHP to output the updated date:
https://docs.generatepress.com/article/generate_post_date_output/#only-show-updated-date
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/April 4, 2021 at 5:24 am #1720805Tareq
I am using this method in a couple of my sites but in a new site, this is not working. I tried using code snippets, gp child theme, and using main themes function, but nothing is working.
But the other sites are perfectly showing update date. What may have gone wrong here? Please helpApril 4, 2021 at 9:03 am #1721230Ying
StaffCustomer SupportHi Kelvin,
Could you open a new topic for this?
You can link us to the site in question using the private information field.
Let me know 🙂
May 31, 2021 at 7:42 pm #1805342To
Hi David?
Where to add below code? I also would like to display “last updated” for my blog posts.“.page-hero time.updated {
display: inline;
}
.page-hero time.published {
display: none;
}”Thanks,
May 31, 2021 at 10:17 pm #1805440Elvin
StaffCustomer SupportHi there,
That code is CSS. Here’s how to add it in – https://docs.generatepress.com/article/adding-css/
Although, we can’t be sure if that’s applicable to your site because that was written for the topic starter.
If that one isn’t applicable, can you open a new topic about this? Let us check the site to provide the applicable solution.
Let us know.
A wise man once said:
"Have you cleared your cache?" -
AuthorPosts
- You must be logged in to reply to this topic.