Negation of product attribute criteria
-
Hi there,
I’m using the ajax product filter via two parallel widgets for a bakery shop:
With one widget, customers can filter for ingredients – like chocolate, nuts, whatever…With the second widget, I want to filter for allergens: like wheat, soy products etc.
By default, the filter checks whether the product attribute is set for the product. In case of the allergen filter, I would like to have it the other way round:
Display only the products, that do NOT have this attribute set.My approach would be to modify the query accordingly in
pre_get_posts
.But my question is: Is there maybe a more straight forward way to do this?
Thanks for your answers!
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Negation of product attribute criteria’ is closed to new replies.