Skip to content
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

No way to display front page posts page title #53536

Open
bradhogan opened this issue Aug 10, 2023 · 2 comments
Open

No way to display front page posts page title #53536

bradhogan opened this issue Aug 10, 2023 · 2 comments
Labels
[Block] Post Title Affects the Post Title Block [Type] Bug An existing feature does not function as intended

Comments

@bradhogan
Copy link

Description

This (#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

  1. add two pages called "home" and "blog"
  2. go to readings > settings > set your front page displays
  3. open the index.html file for the default theme
  4. outside of the query loop, add <!-- wp:post-title /--> and save
  5. view your posts page ("blog" in this case)
  6. notice the post title is showing the first blog post title rather than "blog"

Screenshots, screen recording, code snippet

No response

Environment info

  • wp 6.3
  • gutenberg 16.4.0
  • chrome
  • mac

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

@jordesign
Copy link
Contributor

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.

Screenshot 2023-08-11 at 10 06 12 am **Template Editor** Screenshot 2023-08-11 at 10 06 23 am **Page Editor** Screenshot 2023-08-11 at 10 06 32 am **Front End**

@jordesign jordesign added [Type] Bug An existing feature does not function as intended [Block] Post Title Affects the Post Title Block labels Aug 11, 2023
@carlomanf
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Post Title Affects the Post Title Block [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

3 participants