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?
- Get_template_part inside filter?
- I need to hook and change language of facebook sdk
- WP 4.5 hide core customizer sections
- change “missing attachment” text functions.php
- How to filter Sidebar Content
- Use has_filter on comment_post
- How add body_class from wp_termmeta
- Passing variable from child theme function to parent theme filter
- Filter authors on meta value
- when use function the_content break
- Filter page title (displayed in browser tab) of wp-login
- Adding html banner to posts
- `authenticate` filter never gets called
- I’ve set up an extra field for all the available widgets. How do I show it’s value in the front-end?
- Echo string in admin panel footer beside version no
- How to change default text for specific post type
- Add PHP code after title in single post pages?
- How can I get the default content of WordPress post?
- Echo taxonomy name – second level
- How do I hide tinymce within the edit screen of a particular page
- How can I edit comment meta value before it is saved?
- Why current_user_can(‘edit_comment’) always true?
- What would cause the gettext filter to not work for a given text domain?
- Add filter unless it is being called under specific function
- pre_get_posts to hide everywhere posts from “Archive” category
- Shorten the title length
- Problem with Class, Filters and Callbacks
- Match and Merge Terms in Different Taxonomies
- Remove comments validation (remove filter?)
- Custom Taxonomy Terms in Menu lead to which page?
- Apply wordpress filter checking category
- paginate_links() Change the order of links
- Custom nav walker: How to acces the $args parameter?
- Disable sanitize_file_name on upload without modifying functions.php
- Override email_exists function
- Add a field to the taxonomy editor?
- Removing URL and adding container around image in the featured image metabox
- Which Filter Do I Use To Modify The Subject Of The Retrieve Password Notification Email?
- Access post ID in “content_save_pre”
- Register users by e-mail
- Email Obfuscation: Is antispambot() Acceptable? [closed]