-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Always include core/query
block correctly in Twenty Twenty-Three theme
#4341
Always include core/query
block correctly in Twenty Twenty-Three theme
#4341
Conversation
block in TT3 theme, to avoid problems with the loop.
#4342 is another PR using the same branch as this one just for testing purposes, which also includes the changes from WordPress/gutenberg#49904. |
Does it mean that with all the changes applied, all themes must use the Query Loop also on the single page/post pages? |
@gziolo Yes, that's correct. I understand that may seem odd, but it is critical that the query loop runs in those templates as well. To be fair, maybe there is a simpler way, in which we can solve it automatically without requiring use of the See any of the other classic default themes for reference - they all have the query loop in To clarify: We don't necessarily have to use the @carolinan left a related comment in https://core.trac.wordpress.org/ticket/58154#comment:5. I'd be happy to think about other ways to handle this - maybe we can modify Gutenberg to allow using only the But the current behavior is causing several bugs that break backward compatibility, so fixing that in some way is critical. |
That was my first thought too and it seems quite hard to reinforce such a restriction, since with the site editor you can edit visually a template and can start with an empty one. Also what happens to other existing block themes that do not have these updates? I'm all for removing the call to Calling From a different comment:
|
That's a great point. It suggests to me that we should probably find a low-level solution in which we ensure the loop is always properly started regardless of using the
This I find a confusing statement. Either we care about back compat, or we don't :) Not having the Maybe we can add some intelligent logic where we in block templates without a To conclude, I see the point of not putting this problem on block theme developers, so maybe this PR is not the right way to go. But the problem still needs to be fixed. Probably better to continue this discussion in WordPress/gutenberg#49904, which is more about the root problem. |
Closing in favor of #5104. |
This PR fixes the 3 templates in TT3 which had problems due to incorrect / missing usage of the
core/query
block.Trac ticket: https://core.trac.wordpress.org/ticket/58154
This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.