Skip to content

The latest posts block prints the block comment on the front when the full post is enabled #69427

@carolinan

Description

@carolinan

Description

When the latest posts block has the setting "Post content" enabled and set to full post, the block comment is printed on the front of the site.

In this example, the content of the post that is listed by the block has a single paragraph.
I copied this markup from the front of the site:

<div class="wp-block-latest-posts__post-full-content"><!-- wp:paragraph -->
<p>a sticky post!</p>
<!-- /wp:paragraph --></div>

(This is not a regression in 6.8)

Step-by-step reproduction instructions

Create a few posts.
Insert a latest posts block.
Save and view the HTML of the latest posts block on the front of the site.

Screenshots, screen recording, code snippet

No response

Environment info

No response

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

Please confirm which theme type you used for testing.

  • Block
  • Classic
  • Hybrid (e.g. classic with theme.json)
  • Not sure

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Block] Latest PostsAffects the Latest Posts 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