Skip to content

Query Loop does not include private posts #38688

@mrfoxtalbot

Description

@mrfoxtalbot

Description

The Query Block does not display private posts. The public view does show all posts, including private ones, but the editor view only displays published posts:

Editor View:
Screen Shot on 2022-02-10 at 01:10:54

Public view:
Screen Shot on 2022-02-10 at 01:09:57

Step-by-step reproduction instructions

  1. Create two posts: One public, one private
  2. Edit the Homepage template in the Site Editor.
  3. Add a query loop
  4. Notice how the private post does not show
  5. Save and visit the public view: The private post is listed there,

Screenshots, screen recording, code snippet

Additional Screenshots using the TT1 Blocks theme.

Editor view:

Screen Shot on 2022-02-10 at 01:17:10

Public view:

Screen Shot on 2022-02-10 at 01:17:29

Environment info

  • WordPress 5.9
  • Gutenberg 12.5.4

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] Query LoopAffects the Query Loop Block[Feature] Site EditorRelated to the overarching Site Editor (formerly "full site editing")[Type] EnhancementA suggestion for improvement.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions