Skip to content

Blog page title block displays first post title in query #38574

@Humanify-nl

Description

@Humanify-nl

Description

When rendering the page, the title of the first post in the query loop is displayed as page title. Instead of the title of the page.

After that, I've tried to add Archive Title block instead, but this doesn't render anything at all.

Is this intended behavior? How do we add a title for the blog page? All I can think of right now is a static heading in the template.

Step-by-step reproduction instructions

  1. Add a new page with page-title 'blog'.
  2. Set this page as the blog page through reading settings.
  3. Add the template home.html + header.html template part.
  4. In this template, add a Page Title block.
  5. Display the posts page and the title renders the first title in the posts loop

Screenshots, screen recording, code snippet

No response

Environment info

  • WP 5.9
  • Without Gutenberg plugin

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions