Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not allow placement of Query Loop inside Post Content #40944

Open
jameskoster opened this issue May 9, 2022 · 1 comment
Open

Do not allow placement of Query Loop inside Post Content #40944

jameskoster opened this issue May 9, 2022 · 1 comment
Labels
[Block] Query Loop Affects the Query Loop Block [Type] Enhancement A suggestion for improvement.

Comments

@jameskoster
Copy link
Contributor

Query Loop as it exists today has kind of been built as a block-based interpretation of WP_Query. While powerful, it has inevitably resulted in an overwhelming UX. For example the confusing and unpredictable "Inherit query from template" option exists because it's possible to place Query Loop in templates and posts. Not to mention that blocks like Query Pagination simply do not work in posts at all, with no explanation offered by the interface.

Screenshot 2022-05-09 at 16 52 01

Before this gets too far out of hand, it might be good to explore contextually optimised implementations, based on the various jobs users employ Query blocks to perform.

By prohibiting the placement of the base Query block in Post Content it immediately becomes singular in purpose – display posts as defined by the template. Consequently it needn't entertain so many options and the overall experience can be streamlined.

Screenshot 2022-05-09 at 16 55 44

Naturally we still need to provide ways to display post lists in pages and so on, but these use cases can be handled by simple variations of the base Query Loop as discussed in:

It goes without saying that we cannot implement this change until those variations exist. We'd also need to consider how to handle pre-existing Query Loops as well.

@jameskoster jameskoster added the [Block] Query Loop Affects the Query Loop Block label May 9, 2022
@mtias
Copy link
Member

mtias commented May 22, 2022

I don't think we should exclude query block from post-content until we have the variations in place.

Edit: I see you mention the same thing at the end :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Query Loop Affects the Query Loop Block [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

3 participants