Site logo

Archived topic

How to show "Last Updated" date in posts?

13 replies · Started by Velin on July 26, 2017

Viewing posts 1–14 of 14

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!

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.

Can you try this CSS instead?

.posted-on .updated {
    display: inline-block;
}

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.

You still need the old one as well. So this should be everything:

.posted-on .updated {
    display: inline-block;
}
.posted-on .published {
    display: none;
}

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.

The CSS from your original post should work:

.posted-on .updated:before {
    content: "Last updated: ";
}

Yes, it works like charm, thank you very much!

No problem!

Where do we paste this code?

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.
Jude

Hi 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.

This archived topic is closed to new replies.