Skip to content

core/post-content block don't shows the correct content in pages (post type) #44981

Description

@diegosomar

Description

If the core/query > core/post-content appears BEFORE the page core/post-content, it shows the page content instead the query loop item content.

This issue is probably related with #42862 and #40743.

Step-by-step reproduction instructions

  1. In the page (post type) tamplate, use the core/post-content to show the page content;
  2. Create a page and add some content;
  3. In the header template, add a core/query block to show a different post type and in the loop, add the core/post-content block.
  4. Go to the page and in the query loop you will see the current post content instead the query loop post content.

The query does not need to be in the header. It is enough that the query is above the content of the page, which will be enough to display the content of the page instead of displaying the content of the query.

Screenshots, screen recording, code snippet

wp-2022-10-14_10.22.14.mp4

Environment info

  • WP version: 6.0.2;
  • Plugins: only Gutenberg 14.3.0;
  • Theme: TT2;
  • Browser: Microsoft Edge (Ubuntu version).

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

    [Block] Post ContentAffects the Post Content Block[Type] BugAn existing feature does not function as intended

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions