Archived topic
Showing date
4 replies · Started by Jee on April 27, 2020
I added in code to show last updated date and published date on the permalink page. But I would like to show only the last updated date on the homepage and other landing pages. And I would like the date shown on the homepage and landing pages to only show the actual date without saying "Last updated." What would be the code to do this?
Hi there,
Sorry what code are you adding currently?
Have you tried this?
https://docs.generatepress.com/article/show-the-updated-post-date/
I have this which I want only on the permalink pages:
/*last updated and published date*/
.posted-on .updated {
display: inline-block;
margin-right: 15px;
}
.posted-on .published:before {
content: "Published: ";
}
.posted-on .updated:before {
content: "Last Updated: ";
}
What code can I put in to show just the lasted updated date everywhere else (homepage, category, search result pages).
I figured it out!
Added this:
.home .published {
display: none;
}
.home .updated:before {
display: inline-block;
}
Glad to hear :)