Make WordPress Core

Opened 8 months ago

Closed 8 months ago

#59222 closed enhancement (reported-upstream)

Published date should be displayed if there is no modification date in "Post Modified Date" block.

Reported by: benimub's profile benimub Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: General Keywords:
Focuses: Cc:

Description

While I was testing the FSE theme "Twenty Twenty-Three" to create the blog, I wanted to show the modified date of the post. For that, I choose "Post Modified Date" block. Then I enabled the toggle option for "Display Modified Date".

Once I enabled this option, now only the modified post will show the date, and the published date will not show.

Suggestion:

  1. Add a condition so that the modified post will show it's date. And if it is not modified, then published date should be shown.
  2. Also add label for Published and Modified Date so that the user won't be confused between post date and modified date. At the moment, as there is no option of adding label, I added paragraph block for label. Now empty label show for the post that has not been modified.

Attachments (3)

modification-date-added.jpg (615.6 KB) - added by benimub 8 months ago.
front-end-modification-date.jpg (487.3 KB) - added by benimub 8 months ago.
date-recommendatio.jpg (501.8 KB) - added by benimub 8 months ago.

Download all attachments as: .zip

Change History (4)

#1 @poena
8 months ago

  • Milestone Awaiting Review deleted
  • Resolution set to reported-upstream
  • Status changed from new to closed

Hi!
Kindly note that issues and feature requests about blocks should be opened in the Gutenberg GitHub repository.

Like you described, the published date does not show if the modified date setting is selected.

This is a feature that was built in on purpse, because it was requested by users.
Without it, it would not be possible for themes to display both the published date and the modified date, like "Published XX. Last modified XX".
With the propsed condition, the same date would show twice, and the information would also be inaccurate.

You can read about it here: https://github.com/WordPress/gutenberg/issues/46645

A prefix for the block has been requested here: https://github.com/WordPress/gutenberg/issues/47738 Please continue the disccusions there.

Becasue this has already been reported, I am closing this ticket as reported upstream.

Note: See TracTickets for help on using tickets.