Skip to content

Query block: Add a way to inherit the global $query #25377

@aristath

Description

@aristath

Discussed briefly in a meeting on Slack so creating a ticket for it.

The query block should have an option to inherit its options from the global $query. This will allow us to avoid creating a separate template in FSE for each category/tag etc, and instead, have a single template for all categories.
The blocks will still render the same way the user defines them, what changes is that if that query-block inherits the global query, it will get the posts from the context of the URL by inheriting the global $query.
Settings for posts-per-page, offset etc can still work, but not the filtering aspect of the block's settings.

Metadata

Metadata

Assignees

Labels

[Block] Query LoopAffects the Query Loop Block[Feature] ThemesQuestions or issues with incorporating or styling blocks in a theme.[Status] In ProgressTracking issues with work in progress

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions