Open bradhogan opened 1 year ago
Confirmed this in testing. If the 'Title' block is inserted in a Home/Index template outside the Query Loop - it will show the title of the title of the first post, not the page itself.
Template Editor
Page Editor
Front End
I thought this was a very old issue, and from some quick research, it seems to have been first reported 12 years ago: https://core.trac.wordpress.org/ticket/17470
The patch that was applied to that ticket predated the block editor and block themes, but as I never use the posts page, I'm not too familiar with what work was done to move it over. I also found some more recent tickets and patches that look related, particularly #52266, but perhaps it doesn't solve the issue comprehensively enough.
Description
This (https://github.com/WordPress/gutenberg/issues/38574) should be re-opened.
What the op in that ticket was talking about is that if you have your reading settings to let's say a "front page displays" and set your posts page to a page you have called called "blog" then in your block theme's index.html (let's assume there isn't a home.html because there doesn't have to be), then you add outside of the query block, the output is the first post title in the query (even if it is outside of the query block) when in fact it should display the page name ("blog" in this case).
Without this, there is currently no way of showing the page title for a site owner's blog page which is pretty crazy.
Step-by-step reproduction instructions
<!-- wp:post-title /-->
and saveScreenshots, screen recording, code snippet
No response
Environment info
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