WordPress / gutenberg

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

Query Block: add ability to exclude taxonomies #53485

Open cuemarie opened 1 year ago

cuemarie commented 1 year ago

What problem does this address?

In order to exclude a particular category or tag from the Query Loop block, one must manually add all other categories/tags to the block, leaving the "excluded" option out. This is time consuming and laborious, and would be a better experience to have the option to exclude by taxonomy as well as include.

Related discussion found here: https://github.com/WordPress/gutenberg/issues/30706#issuecomment-1561718362 Requested here: https://github.com/Automattic/wp-calypso/issues/80362

What is your proposed solution?

Adding an 'exclude' option in the Options menu of the Block Settings > Filters modal could add this feature without adding more UI to the default interface.

screenshot
cagrimmett commented 12 months ago

+1 My current use case is two separate query loops on my homepage: One for just a single category (weekly updates), and one for everything except that single category.

bradhogan commented 10 months ago

+1 where are we at with this? this is a huge missing feature in the query block and I can't seem to find a workaround function that will target the query loop to solve this in the interim.

liviopv commented 10 months ago

Heavy +1! I'm building a theme for my blog based on a short/long-form content distinction using categories and it's cumbersome to have to list all categories except one when I need to filter out a specific type of content.

tehjaymo commented 6 months ago

+1 Just trying to do this myself and couldn't find an 'exclude' in the taxonomy settings. Feels like a feature that should be added / addressed alongside with this open issue: https://github.com/WordPress/gutenberg/issues/58420

michiecat commented 4 months ago

Huge +1! This would be very helpful for a use case that I'm currently working on: a site where we need a certain set of blog posts to live in one category to serve a different audience than the audience for the main blog. Having the ability to exclude posts in that category from the main query loop would make this a lot easier and more intuitive to manage.

retnonindya commented 1 month ago

+1. I'm currently working on my blog, and I was hoping I could exclude a category from the main content view and treat it like a "microblogging" on the sidebar. I have been moving away from social media and treating my blog as a one-place-for-all. Having the ability to exclude taxonomies would be really helpful.

franckmee commented 3 weeks ago

Huge +1. I have a column for featured articles and another for all articles BUT featured ones. I think it's actually quite a common use case that should be manage by core features.

jschramm-ta commented 4 days ago

+1 to this. Without this ability you can't even always add all other categories because a post might be in more than 1 category, where one is excluded and one is included. Then the post would still be included.