We're merging with GenerateBlocks! Learn more here.

[Support request] "Last Updated" Date

Please login to receive premium support.

Support for the free plugin can be found here.

Home Forums Pro Support "Last Updated" Date

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #6978
    Jake
    Participant

    Hiya Tom,

    I saw you mentioned in this post: https://wpshowposts.com/support/topic/updated-date-meta-from-generatepress/

    That you were looking at potentially making “Last updated” date as part of core. Did you end up getting a chance to do that?

    If not, should I use the code mentioned in the post above to show the last updated date? And then where on my site should I put that PHP code?

    Thank you for your time Tom!

    #6979
    Jake
    Participant

    On further investigation, I found this: https://i.imgur.com/IKrH4ql.png

    So now I just need a nice way to display it so it showed “Published” and “Updated” before each date. Can we do this with CSS?

    #6980
    Jake
    Participant

    So with a bit of help from this: https://docs.generatepress.com/article/show-the-updated-post-date/

    I used the below code:

    .wp-show-posts-updated {
        display: inline-block;
    }
    .wp-show-posts-updated + .wp-show-posts-entry-date {
        display: none;
    }
    .wp-show-posts-entry-date.published:before {
        content: "Published: ";
    }
    .wp-show-posts-entry-date.published:after{
        content: " & ";
    }
    .wp-show-posts-updated:before {
        content: "Last Updated: ";
    }
    

    And got – https://i.imgur.com/voZ2W6K.png

    Wohoo! Anything else I should be aware of? 🙂

    #6982
    Tom
    Keymaster

    Nope! That’s perfect 🙂

    Thanks for posting your code!

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