-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Query Loop: Add custom taxonomies to the Filters options #34977
Comments
There might be some cross over with this ticket: #30706 |
Similar situation as the OP. A lot of our clients rely on custom taxonomies to curate content. Providing any mechanism for devs to extend would be super useful. As a dev, I'd be happy the filter proposed here #36504 |
This is something that I've seen come up again and again on client projects. I hadn't found this issue then but added a comment about it in this PR that would allow for developers to extend the block manually to get the desired result. A native Support in core would of course make this even better :) |
This issue came up in one of our client projects today. Specifically we were evaluating use of the Query Loop block to display a custom post type, but like many custom post types it relies on an accompanying custom taxonomy. Without the ability to filter by that taxonomy we are not able to use the block. #36504 would enable us to address the issue, but support for filtering by any taxonomy which has been associated to the post type feels like something that should just work. |
I'd also love to see this gain some traction as we're looking to add some Block Patterns to a plugin and utilizing the Query Loop block with CPT support would be necessary to have this work as we've planned. For more on that see here: 10up/simple-podcasting#84. |
I am coming across the same issue with my clients' websites as well and agree that it would be really great for all the related custom taxonomies for a post type to show in the query block. I'd say the vast majority of my clients need this functionality to make full use of the Query Loop block on their websites. I agree with @fabiankaegy, and @aaroncommand and everyone on this thread that this functionality should just work by default rather than require block extensions. (Though simplifying block extensions with #36504 would be great too) Thanks for bringing this forward @ryelle 🥳 |
+1 Using Query Loop Block for everything is so close, and yet so far. It’s frustrating having to stop for hours/days to hand-code solutions for common, low-level features when Gutenberg and Full-Site Editing are so well advanced. Custom post types should be first-class citizens, period. |
Putting my +1 on this feature as well. The Loop block is amazing - just up untill this point:) As of now, I need to hand code or use a different loop-feature plugin to accomplish this. |
In Gutenberg version 13.2 the tags and categories filter in the Query Loop block stopped working. |
Hey @poof86 ! The PR that implemented custom taxonomies filtering was part of 12.5 release, so it shouldn't be about this issue. We can test/discuss in the new issue you have mentioned. |
What problem does this address?
Currently, you can add a Query Loop block for any post type with REST API support, but the only taxonomies you can use to filter are categories and tags, not custom taxonomies. For example, on WordCamp.org, we have "Speakers", with a custom taxonomy "Speaker Groups". When I add a Query Loop with the Speakers post type, I'd expect the Speakers Group to show up in this Filters section:
What is your proposed solution?
Rather than just hard-coding categories and tags, and turning them off if they're not supported, show all post-type supported taxonomies.
This was mentioned in #24934 (comment), but it's not clear if anyone is still working on it.
The text was updated successfully, but these errors were encountered: