Site logo

[Support request] How to add posted and updated dates to posts

Home Forums Support [Support request] How to add posted and updated dates to posts

Home Forums Support How to add posted and updated dates to posts

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #2536415
    Derek

    Hi,

    I would like to have a date posted and the date updated under the title tag of each post. It should read as follows:

    “Posted on May 4, 2022 – Updated on October 4, 2022 by Derek(Author name)”

    This should be in a smaller text than the writing on the page. I do wonder how this will work as within each post, there is only 1 single date that you can enter. When I go to update a post, how will it keep my original “posted” date?

    #2536420
    Fernando
    Customer Support

    Hi Derek,

    For reference, can you provide a link to any of your posts? We’ll check your current structure and assess what is needed.

    #2536508
    Derek

    I don’t have my theme changed over yet. I can come back to you?

    #2536665
    David
    Staff
    Customer Support

    Hi there,

    when you update the post, WP will save the Updated (modified) date as well as the Published date.
    In GP there are several ways to update the post meta to show what you require.

    The simplest method is to use a GP Block Element where you can visually build your meta:

    https://docs.generatepress.com/article/block-element-post-meta-template/

    But please come back to us when you’re ready, and we can cover what option is best for you.

    #2537467
    Derek

    Hi David and Fernando. I have added my site into the area below. Could you please take a look when you are free. Thank you.

    #2537758
    David
    Staff
    Customer Support

    I assume just on the Single Post ?

    If so go to Appearance > Elements ( or when viewing a post via the Admin Bar > Elements menu ) and edit the Single Post Hero.
    Here you will see the block built hero element, that includes the Headline block that has its dynamic data set to display: Post Date -> Published Date.

    Duplicate the Block, and change the new one to show Updated date.

    You can make more duplicates of those blocks, and remove the dynamic data, and use them to show some static text, such as Published on:

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