Site logo

Archived topic

How to add posted and updated dates to posts

5 replies · Started by Derek on February 16, 2023

Viewing posts 1–6 of 6

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?

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.

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

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.

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.

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:

This archived topic is closed to new replies.