Skip Navigation

[Resolved] Change Comparison of Checkbox Filter

This thread is resolved. Here is a description of the problem and solution.

Problem:

How to make a taxonomy filter with checkboxes limit WooCommerce product listings to only those items that have ALL of the selected checkboxes.

Solution:

You can setup the taxonomy filter manually, for example: Edit the the view block you mentioned above, there is a section "Query Filter" in the right sidebar, here you can setup the taxonomy filter as what you want,

For example: Select posts with taxonomy: Categories slug in all of those set by the URL parameter wpv-category

Relevant Documentation:

https://toolset.com/documentation/user-guides/views/filtering-views-by-taxonomy/

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

This topic contains 5 replies, has 2 voices.

Last updated by aaronM-9 1 year, 6 months ago.

Assigned support staff: Luo Yang.

Author
Posts
#1551545
taxonomyfiltersettings.PNG

I'm trying to re-learn how to do views using the block editor and cannot figure out how to make a taxonomy filter with checkboxes limit WooCommerce product listings to only those items that have ALL of the selected checkboxes. Right now I think it just displays products that have ANY of the checked terms. In the video tutorial it says there should be a section in the search filter settings for comparison options but I do not see this.

Where do I tell it how to filter the view output based on which checkboxes are selected? See image.

- Aaron

#1551937

Luo Yang
Supporter

Languages: English (English ) Chinese (Simplified) (简体中文 )

Timezone: Asia/Hong_Kong (GMT+08:00)

Query-Filter.JPG

Hello,

Yes, you are right, by default, views will output posts "that have ANY of the checked terms" .

But you can setup the taxonomy filter manually, for example:
Edit the the view block you mentioned above, there is a section "Query Filter" in the right sidebar, here you can setup the taxonomy filter as what you want, for example:
Select posts with taxonomy:
Categories slug in all of those set by the URL parameter wpv-category
eg. hidden link

See screenshot: Query-Filter.JPG
https://toolset.com/documentation/user-guides/views/filtering-views-by-taxonomy/

#1552587

Hi Luo,

Sorry, I know this should probably be easy but I'm still having trouble. The only spot I can find the "Query Filter" is in the document settings (lower-right as you said). However, when I click to add a filter none of my taxonomies appear in the list. It appears to be just post fields and custom fields.

- Aaron

#1552943

Luo Yang
Supporter

Languages: English (English ) Chinese (Simplified) (简体中文 )

Timezone: Asia/Hong_Kong (GMT+08:00)

tax-filter.JPG

I have tried it in my localhost with a fresh WordPress installation, I can see both Woocommerce taxonomies without any problem:
- Product Categories
- Product Tags
see screenshot: tax-filter.JPG
Please make sure you are querying the correct post types, for example, in section "Content Selection", enable option "Products"

#1554901
no-taxonomies.png

Hi Luo,

The loop selection is set to "Products" as the post type (none others selected). Taxonomies do not appear in the list of available filter options. See screenshot.

#1555429

I was able to address this issue by reverting back to the classic views editor. I did not realize this was an option originally.