Post Formats: Query loop shows the wrong posts when inheriting the query from the post format archive template #65320
Labels
[Block] Query Loop
Affects the Query Loop Block
[Type] Bug
An existing feature does not function as intended
Description
I have only tested this with a block theme.
When a query loop block with the setting
Inherit query from template
is placed in an archive template for a post format,the correct posts are shown on the front, but not in the editor. In the editor, all posts are shown.
Step-by-step reproduction instructions
First, you need a block theme, and you need to enable post format support on the active theme.
If your theme does not have a functions.php file, create one.
Example:
Set the permalinks on the test installation to Post name.
Create a few posts and assign them the link post format.
Next, add a link post format archive template inside the theme's
templates
folder.templates/taxonomy-post_format-post-format-link.html
Go to Appearance > Editor > Templates, locate and edit the template.
Add a query loop block. In the block settings sidebar, make sure that
Inherit query from template
is enabled.Check if the query loop shows the correct posts, it should only show the posts that you assigned the link format to.
Save.
View the archive on the front: Add
type/link/
after your test domain in the browser address bar.(For example
http://66.local/type/link/
)Screenshots, screen recording, code snippet
No response
Environment info
WordPress 6.6.2, with and without Gutenberg trunk.
Please confirm that you have searched existing issues in the repo.
Please confirm that you have tested with all plugins deactivated except Gutenberg.
The text was updated successfully, but these errors were encountered: