Are you a GenerateCustomer?

Do you have an active GP Premium or GenerateBlocks Pro license key?

Create a GenerateSupport account for GeneratePress and GenerateBlocks support in one dedicated place.

Create an account
Already have a GenerateSupport account? Login

Just browsing?

Feel free to browse the forums. Support for our free versions is provided on WordPress.org (GeneratePress, GenerateBlocks).

Want to become a premium user? Learn more below.

Show Published and Last Update Date (ACF) Together in Single Page Hero Element

  • 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]

  • 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.

  • Hi Fernando, I was thinking way too complex, solved. Thank you.

  • You’re welcome, Gerrit!

  • You’re welcome, Gerrit!

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