-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Post Date block doesn't show the modified date for newly published posts #57915
Comments
I see, that this was the most recent change in the post date block and was intentional: #46839 |
@bugnumber9 I recommend using |
Well, this is a bit weird. |
@bugnumber9 you don't need an extra function you can just do |
I'm using FSE theme and I use Post Date block in postmeta template. Besides that, both It's the Post Date block behavior that I find weird in this case because I can't reliably use |
We need to think about how can we satisfy both these requests without making the block options too complex. |
@carolinan IMO the block should behave just like Besides that, the current behavior will still display two identical dates if the post was edited, say, several minutes after publishing which kinda defeats the purpose of #46839 |
And that is your opinion, please respect that there are other users who have expressed different needs. |
Yes, absolutely. It's just my opinion of course, and I was able to achieve the behavior I wanted using a 3rd party block display logic plugin to fall back to published date. That being said, the display logic of both published and modified dates is often a matter of personal preferences or project requirements. Just my 2.5 cents :) |
I personally don't find it strange that the modified date literally only shows if the post has been modified. |
Description
When a new post is published and hasn't been modified after publishing, the Post Date block doesn't show the modified date.
I confirmed that
get_the_modified_date
function works as expected in a non-FSE theme (Hello theme) by altering the code in single.php as shown here:The output is expected:
However, when I change a single post template in site editor (standard 2024 theme) as shown here:
The modified date on the frontend is empty:
Step-by-step reproduction instructions
Shown above.
Screenshots, screen recording, code snippet
No response
Environment info
No response
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
The text was updated successfully, but these errors were encountered: