- This topic has 7 replies, 4 voices, and was last updated 2 years, 2 months ago by Ying.
-
AuthorPosts
-
December 18, 2021 at 5:17 am #2052814Usman
Hello there,
I want to show the last updated time under the post title instead of when it was published. For this, I researched a little bit and found https://docs.generatepress.com/article/show-the-updated-post-date/ this article.
I don’t understand what to do with this CSS or other codes.
Is there anyone who assist me in updating May 17, 2021 by USM to by USM | Last Updated August 22, 2021?
Thanks in advance
Looking Forward
UsmanDecember 18, 2021 at 11:27 am #2053160YingStaffCustomer SupportHi Usman,
Go to customize > additional CSS, copy and paste this CSS to there:
.posted-on .updated { display: inline-block; } .posted-on .updated + .entry-date { display: none; } .posted-on .updated:before { content: " | Last Updated "; } .single-post .entry-meta { display: flex; } .single-post .entry-meta >span.byline { order: -1; padding-right: 10px; }
Let me know if this helps π
December 18, 2021 at 8:36 pm #2053383UsmanYes, it worked perfectly on single posts. Thank you Ying.
I am looking if it works on archive pages too?
Currently, some posts in archive pages show “August 25, 2021 by USM” while others “| Last Updated November 2, 2021 by USM”
Thanks again.
UsmanDecember 19, 2021 at 4:59 pm #2053999ElvinStaffCustomer SupportHi Usman,
Can you link us to a sample archive page of the site you’re working on? To be sure why the CSS isn’t working for it and have a better idea on which way to approach this.
You can use the private information text field to provide the link – https://docs.generatepress.com/article/using-the-premium-support-forum/#private-information
Let us know. Thanks! π
December 19, 2021 at 9:05 pm #2054079UsmanHey Elvin, thanks for replying.
Here is the link: https://smartkitchens.review/grills/
Looking Forward
UsmanDecember 19, 2021 at 10:11 pm #2054115ElvinStaffCustomer SupportAh I see now. thanks.
The posts that doesn’t display
Last Updated
are posts that have no history of being modified. They don’t have a modified date to display so there’s no element to display “last updated” on.Any specific parts you need fixed? (example: removing
|
on archive pages?)We can modify this CSS to remove
|
on archive pages.Example:
body:not(.blog,.archive) .posted-on .updated:before { content: " | Last Updated "; } body.blog .posted-on .updated:before, body.archive .posted-on .updated:before { content: "Last Updated "; }
January 22, 2022 at 11:16 pm #2090344surendra1506Thanks, Ying and Elvin for a perfect solution.
January 23, 2022 at 11:57 am #2090983YingStaffCustomer SupportYou are welcome!
Always happy to help π
-
AuthorPosts
- You must be logged in to reply to this topic.