-
Gerrit
Hi,
I’m trying to show the last updated date on my single post hero element and the published date as well. I’m using GP Pro and GB Pro, both the latest version. Right now, to display the published date is achieved with Single Post Hero Block, then under Dynamic options, it was set to Date Type: Published Date. When I switch the toggle to “Replace with updated date,” it does exactly that. I’ve set the pre-published text to Published: and the pre-updated text to: Updated:
But I don’t see a standard option to display both dates, just either one. I searched the forum and found that both dates are available but hidden with CSS. I found this snippet in a forum post:
/* Display updated date */ .posted-on .updated { display: inline-block; margin-right: 1em; } /*Add date prefixes */ .posted-on .updated:before { content: 'Updated: '; } .posted-on .entry-date:before { content: 'Published: '; }
That is not changing anything for me.
As a bonus, I would not like to show the standard last updated date from WordPress because that date changes too often then (with every . or, revision). Instead, I created an ACF field where I enter the date that I find is a significant update. I want to show that date instead of the standard WordPress date. That field name is “last_major_update” If you can help me achieve that, I would be super happy!
Thank you.
[url=https://postimg.cc/qhsT7S8N][img]https://i.postimg.cc/qhsT7S8N/Screenshot-2023-05-03-at-07-49-31.png[/img][/url]
-
Fernando
Hi Gerrit,
Just add another Headline Block for the ACF date. Retrieve it through the Dynamic Data Options.
Basically, you’ll have one Headline Block for the Published date, and another for the ACF field.
-
Gerrit
Hi Fernando, I was thinking way too complex, solved. Thank you.
-
Fernando
You’re welcome, Gerrit!
-
Fernando
You’re welcome, Gerrit!
- You must be logged in to reply to this topic.