PostTitle: Empty heading tag rendered for posts without titles #69039
Labels
[Block] Post Title
Affects the Post Title Block
[Status] In Progress
Tracking issues with work in progress
[Type] Bug
An existing feature does not function as intended
Description
The Query Loop Block's Post Title component renders an empty
<h2>
tag for posts without titles, unlike other blocks like Latest Posts which show "(no title)". Additionally, when "Make title a link" is enabled, unexpected spacing appears around the heading tag. This creates inconsistency with WordPress core behavior and affects the layout.Step-by-step reproduction instructions
<h2>
tag is rendered for posts without titlesScreenshots, screen recording, code snippet
2025-02-05.12-44-15.mp4
Environment info
Please confirm that you have searched existing issues in the repo.
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Please confirm which theme type you used for testing.
The text was updated successfully, but these errors were encountered: