WordPress / gutenberg

The Block Editor project for WordPress and beyond. Plugin is available from the official repository.
https://wordpress.org/gutenberg/
Other
10.52k stars 4.2k forks source link

Add current term to Query Loop block filter for use on taxonomy archives #64354

Open coreyworrell opened 3 months ago

coreyworrell commented 3 months ago

What problem does this address?

When designing a taxonomy/term archive in the site editor, it is often necessary to separate out post types. This can now be down by adding multiple Query Loop blocks and setting the post type for each. But when it comes to restricting them to the current term, there is no way to do that dynamically.

What is your proposed solution?

When editing the Query Loop block, and then clicking in sidebar Filters > + > Taxonomies, each field should have the option for "Current term". This option should show on input focus (ultimately I think all terms should be shown as checkboxes, just like when adding Categories for a Post). Maybe this option only shows when editing a Taxonomy archive.

carlomanf commented 3 months ago

31272 and #39192 talk about a similar idea for the current post.