Forums › Forums › Search & Filter Pro › How to show only relevant filters for each category?
Tagged: V3
- This topic has 7 replies, 2 voices, and was last updated 4 years, 2 months ago by Trevor.
-
Anonymous(Private) October 28, 2020 at 2:20 pm #264431
Hi Trevor,
I am using different Woocommerce product categories, each with their own attribute set; with ACF I added different attributes to every category. Now when I view a category on the front end, I see all filters instead of only the filters that are assigned to this category.
How can I achieve that only the assigned filters are shown in a category?
Thanks in advance,
Roeland van OostenbruggeTrevor(Private) October 28, 2020 at 5:16 pm #264475Assuming that Product Category is a field in the form, and that the correct Category is already selected (there is an auto detect option/setting in the form settings), then, in the General Setting tab, set
Auto Count
(both settings) toON
And then in the Form UI:
In each field set
Hide Empty
set toON
Anonymous(Private) October 29, 2020 at 9:46 pm #264676Hi, thanks for your explanation. I did what you say but it seems not to work;
– I added a productcategory filter based on the taxonomy filter
– The right category is indeed selected after loading the front end
– Both auto count settings are on
– Hide empty is on in every field where available (not available in range slider number field)1) All fields are still shown on front end, also when the corresponding ACF attribute is not connected to the product category
2) Selecting a filter option on front end removes the products, I think because of the range slider field parameters that are added to the url.Any ideas?
Thanks again,
Roeland van OostenbruggeTrevor(Private) October 30, 2020 at 2:46 pm #264773Ah, you want the fields themselves to disappear (field dependency). Do all the terms disappear, but not the fields themselves? Our Hide Empty feature only applies to the terms. Whilst this may change for V3, the only way to do that now would be some custom javascript. Just how that might work, I am not sure, but I have no snippets to share for that, sorry.
-
AuthorPosts