- This topic has 5 replies, 2 voices, and was last updated 5 years, 5 months ago by
David.
-
AuthorPosts
-
November 18, 2020 at 6:45 am #1536028
Mary
Hi,
I was to remove the publish date on my blog post and show only the update date. I found your article on how to do it in CSS but it didn’t quite work.
This is the code I was supposed to add:
add_filter( ‘generate_post_date_show_updated_only’, ‘__return_true’ );
Right now, this is my CSS look like:
.posted-on .updated {
display: inline-block;
margin-right: 15px;
}
.posted-on .updated:before {
content: “LAST UPDATED: “;
}.posted-on .published:before {
content: “PUBLISHED ON: “;
}———-
I tried removing this part:
}
.posted-on .updated:before {
content: “LAST UPDATED: “;
}.posted-on .published:before {
content: “PUBLISHED ON: “;
}to replace with the code earlier but it only removed the words “LAST UPDATED and PUBLISHED ON”. Both dates are still showing. Here’s a screenshot: https://prnt.sc/vljmxq
Thank you!
Mary
November 18, 2020 at 9:00 am #1536448David
StaffCustomer SupportHi there,
can you provide a link to your site where i can see the issue?
November 19, 2020 at 3:07 am #1537304Mary
Hi David,
Sure, I added it on the private information form. I am back to my original CSS and didn’t add the new one yet:
.posted-on .updated {
display: inline-block;
margin-right: 15px;
}
.posted-on .updated:before {
content: “LAST UPDATED: “;
}.posted-on .published:before {
content: “PUBLISHED ON: “;
}.entry-content ul {
margin-left: 3em !important;
}
@media (min-width: 769px) {
.navigation-search.nav-search-active {
left: 0%;
width: auto;
}
}November 19, 2020 at 5:38 am #1537435David
StaffCustomer SupportThis code is PHP:
add_filter( 'generate_post_date_show_updated_only', '__return_true' );Remove it from your CSS, and follow this article that explains how to add it:
November 19, 2020 at 6:35 am #1537503Mary
Hi David,
Thanks for the help, I also found another solution in CSS if anyone in the future read this thread:
.entry-meta .entry-date.published {
display: none;
}Or you can try the below CSS codes.
.entry-meta {
display: none;
}November 19, 2020 at 6:44 am #1537511David
StaffCustomer SupportGlad to hear that !
-
AuthorPosts
- You must be logged in to reply to this topic.