[Resolved] How to show "Last Updated" date in posts?

Home Forums Support [Resolved] How to show "Last Updated" date in posts?

Home Forums Support How to show "Last Updated" date in posts?

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #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!

    #355254
    Leo
    Staff
    Customer Support
    #355264
    Velin

    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.

    #355267
    Leo
    Staff
    Customer Support

    Can you try this CSS instead?

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

    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.

    #355272
    Leo
    Staff
    Customer Support

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

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

    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.

    #355275
    Leo
    Staff
    Customer Support

    The CSS from your original post should work:

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

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

    #355290
    Leo
    Staff
    Customer Support

    No problem!

    #1335618
    Marcos

    Where do we paste this code?

    #1335693
    Leo
    Staff
    Customer Support
    #1848808
    Jude

    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

    #1848828
    David
    Staff
    Customer Support

    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.

Viewing 14 posts - 1 through 14 (of 14 total)
  • You must be logged in to reply to this topic.