The way WordPress handles this by default is not ideal – they provide the WP_Query object – through that, you can add whatever filters you like but there’s no easy way I know of to create adaptive filters.
That’s one of the reasons I created my Faster Woo Widgets plugin – it does exactly what you’re looking for – it lets you create category widgets with either adapative or standard filters – if you choose adaptive, then a category list of 10 items will become, for example, a list of only 2 items once you have selected the colour Red.
https://www.wpintense.com/knowledgebase/adaptive-filters/
The way I handle this code is through my own custom SQL code. It’s a join from wp_posts to wp_taxonomies and the related tables from there.
Related Posts:
- Change term name only on front
- Display post after choice two taxonomy terms
- How to pass/get data to/from the WooCommerce data-product_variations object?
- is it possible to add “extra” table nav to edit-tags.php screens?
- Filter hook before create order WooCommerce
- Display WooCommerce newest product reviews on top [closed]
- How to change Woocommerce breadcrumbs content?
- Add Dropdown menu using “add_filter => wp_nav_menu_items”
- Restrict filter to run only inside specific function
- How to always display a specific post from the search result first
- What hooks/filters are there to alter selected terms on post save?
- How to display term description in empty terms archive?
- Taxonomy Custom Column – ‘manage_{TAXONOMY}_custom_column’ filter only passing 2 arguments
- Is there a filter hook that I can use to change how taxonomy term names are displayed?
- Filter category in WooCommerce shop page to display related sub-category
- How to change currency programmatically on creating order action?
- How to order by taxonomy using wp_query
- Redirect to checkout woocommerce failed
- Filter the regular price of woocommerce products
- Filter taxonomy admin pagination
- Insert term when page is published – avoid duplicates after edits
- Filter custom post type using multiple taxonomy dropdowns
- Add default user field to WooCommerce checkout [closed]
- Link to Shop-Filter with .current-menu-item
- Adding a Clone link to product attributes – post_row_actions() filter, or how to override a Class question
- Create Search Form to Filter Through Terms
- Sorting a specific taxonomy by archive date using URL
- Woocommerce “added to cart” message on main(home) page
- Redirect to another page using contact form 7? [closed]
- Replacing a deprecated filter ‘woocommerce_get_price’ with ‘woocommerce_product_get_price’
- Woocomemrce order and registration fileds to UPPERCASE
- Exclude product attributes from taxonomy terms loop
- Sorting products by price ( regular + sale price )
- Create a pre-filtered version of the Media Library
- Redirect to woocommerce checkout after adding to cart – item already in cart
- WooCommerce coupon hook argument NULL when using filter woocommerce_get_shop_coupon_data
- How to access page variable inside action hook
- How to query if meta_key does exist or not?
- How to stop the deduction in “wp_term_taxonomy” count, when the post is deleted?
- Include get_term_link inside search
- Split taxonomies on different pages
- Cloning product not copying custom taxonomies
- Get WooCommerce product category list in functions.php
- List all categories that have results in a query
- Restrict retrieved terms by category?
- Post filter with multiple checkbox taxonomy terms
- Put data in my-account/view-order/id/ page
- Admin view: filter posts by whether they have specific taxonomy attached
- WP Job Manager – display search results from custom search form in taxonomy-job_listing_category page
- Modify WooCommerce email shipping text value
- What is the earliest hook you can piggyback on to check terms/taxonomy for a collection view?
- Turn wp_tag_cloud into a front-end filter
- How to create a list of terms who’s posts also have a predefined external term?
- WooCommerce comments_template Filter Not Firing
- Woocommerce: Only one review per verified buyer [closed]
- Display woocommerce product_cat child terms with thumbnails
- Issue On Listing Woocommerce Parent Tag List
- cannot create product attribute (taxonomy) and add terms on the same execution
- How do I check if a post has a term with a particular ancestor/parent?
- Modify WordPress Rest Api Request/Response
- How to add some custom HTML into wordpress admin bar?
- Hook into admin post list page
- Add post/page ID to inserted links within the_content
- Ajax, filters and shortcodes
- Create and move terms for taxonomies
- Multiple Ajax Data Action
- Changing a WordPress core function without hacking core
- How to remove get_post_metadata using remove_filter inside a class?
- Rewriting Woocommerce Product Filters To URL Segments
- Sorting and limitation with pre_get_posts
- Warning: Missing argument 2 for widget_title filter
- Programatically added attribute, set to ‘show on product page’ automatically. Woocommerce [closed]
- How do I hide the current page’s title?
- Display a list of certain categories by ID
- Change name of existing post status type
- Header image automatically changes depending on season
- How to remove SKU’s from ALL products in Quick View – already remove from each product page
- Changing WordPress core without hacking core
- Is it possible to apply filter to meta key value when querying posts?
- apply_filters with multiple args and multiple add_filter
- Return Taxonomy Name for Each Term
- Display sibling categories on category page
- Filter for author list in gutenberg core editor
- WordPress site with embedded menu – gives You don’t have permission to access /wp-content/themes/xxx/taxonomy-redirect.php on this server
- Filter / add_action to upgrade.php page
- Add Filter – Pass Variable (PHP < 5.3)
- Custom Post Type Taxonomy Term Order by Title
- Can’t get term id for category archive
- Problem width wp_insert_post_data and Gutenberg block editor
- add_filter doesn’t return false?
- How to track a particular page in order to address the loading speed issue
- how to overwrite next_post_link
- Print url to default featured image
- Adding user filter – Not updating data in URL
- add_action priority and taxonomy used in plugin
- Custom order of taxonomy using wp_get_object_terms and woocommerce_term_meta
- filter wptexturize doesn’t work on old posts titles
- Getting entry ID from frm_email_message filter in formidable
- Is there a hook or filter that adds a button to the left of the search box?
- Taxonomy term RestApi data 10 rows limitions