- This topic has 13 replies, 4 voices, and was last updated 4 years, 8 months ago by
David.
-
AuthorPosts
-
July 26, 2017 at 5:52 am #355190
Velin
Hello,
I’m currently testing GP Premium and so far I’m really satisfied, keep up the good work. Before posting here I’ve checked the other topics related to the last updated/modified date and I’ve tried to add the following to my website:
.posted-on .updated:before { content: "Last updated: "; }However, that didn’t work as expected as I’m only able to see the published date, including in the source of the post (via the Google inspect element tool). Will you please let me know how to show only the last updated date on my posts and in the Google search results?
Thank you in advance for your time!
July 26, 2017 at 8:18 am #355254Leo
StaffCustomer SupportHi there,
Give this a shot: https://generatepress.com/forums/topic/modified-post-date/#post-171970
July 26, 2017 at 8:26 am #355264Velin
Hey Leo,
I’ve just added the CSS and I was able to hide the published date, however, the updated date is shown on one line and the author name is on the second one, I suspect because the published date is hidden and should be shown before the author name. Will you please let me know how to leave only the updated date and also to add ‘Last updated’ before it?
Thanks.
July 26, 2017 at 8:31 am #355267Leo
StaffCustomer SupportCan you try this CSS instead?
.posted-on .updated { display: inline-block; }July 26, 2017 at 8:34 am #355270Velin
Hi,
Now the two dates are shown next to each other, updated is fist. I’ve removed the old CSS and added only the one from your last reply.
Thanks.
July 26, 2017 at 8:35 am #355272Leo
StaffCustomer SupportYou still need the old one as well. So this should be everything:
.posted-on .updated { display: inline-block; } .posted-on .published { display: none; }July 26, 2017 at 8:37 am #355273Velin
Well,
That did the trick. Now if you can let me know how to add the ‘Last updated’ text, we can mark the case as fully resolved.
July 26, 2017 at 8:39 am #355275Leo
StaffCustomer SupportThe CSS from your original post should work:
.posted-on .updated:before { content: "Last updated: "; }July 26, 2017 at 8:55 am #355287Velin
Yes, it works like charm, thank you very much!
July 26, 2017 at 9:01 am #355290Leo
StaffCustomer SupportNo problem!
June 20, 2020 at 11:13 am #1335618Marcos
Where do we paste this code?
June 20, 2020 at 1:11 pm #1335693Leo
StaffCustomer SupportJuly 8, 2021 at 6:33 am #1848808Jude
Hi there, I have tried to use several codes out of this thread, but I still didn’t resolve my issue, unfortunately. So I would like to have my name as ‘by Jude’ ‘published on’ and then if a post is updated next to it ‘updated at date’.
Could you please help me with the correct code for this to add as CSS?
Looking forwards to hearing from you.
JudeJuly 8, 2021 at 6:50 am #1848828David
StaffCustomer SupportHi there,
could you raise a new topic where you can share a link in the private information field provided – then we can advise the best method.
-
AuthorPosts
- You must be logged in to reply to this topic.