Site logo

Archived topic

Show Updated Date - if missing, then Published date

3 replies · Started by Rick on January 28, 2023

Viewing posts 1–4 of 4

Hi,

I'm using a page hero to show post meta data. One of the things I like is to show the 'Updated on 28 jan 2023' line.

This works fine. But when I freshly publish a post, it does not have an updated date but only a publish date. The publish date than does not show and the meta data returns: Updated On ... (empty)

I would like to show the update date when available, and only the publish date when update date does not exist.

Can we achieve this using a dynamic text type in a heading block?

I saw below post but it does not make use of the blocks

https://generatepress.com/forums/topic/show-published-date-if-modified-date-is-not-available/

I current experience this at: https://gorilla.bi/power-query/fiscal-calendar/

Thank you!
Rick

Hi there,

if you add a Headline block and in the sideabar settings, activate its dynamic data and set its CONTENT SOURCE to Post Date, leave the DATE TYPE as Published and toggle the Replace with updated date option

Worked a charm. Thank you, very happy with the support :)

Glad to hear that !! :)

This archived topic is closed to new replies.