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 date if never updated

  • I’m using the Post Meta block element to display the date and author under post titles. I have it set to show the last modified date, with a text block that says “Updated:” before it. But when a post is first published, it just shows “Updated:” and then the author’s name. No date.

    Is there a way to have it show “Published: [date]” on posts that have never been updated, and updated on those that have been?

  • Hi there,

    if you set the Date to show the Published date, there is an option to display the Updated date if there is one.

  • I’m not seeing that option. This is what I see, and how I set it. What settings should I have to show either/or date?

    bg64VxV70Y

  • Thats the core Date Block.
    Don’t use that.
    Replace it with a GenerateBlocks Headline Block, and in the block settings ( sidebar ) activate the Dynamic Data and set the Content Source to Date.There you will see the options.

  • Thank you! That got the date working. This is probably a long shot, but is there any way to have the word “Published” or “Updated” before the date, depending which it is? If not, I may just remove that word altogether.

  • A simple method would be to add the label using CSS:

    
    .entry-date.published:before {
        content: "Published: "
    }
    .entry-date.updated-date:before {
        content: "Updated: "
    }
    
  • Thank you! That’s brilliant.

  • You’re welcome

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