- This topic has 2 replies, 2 voices, and was last updated 10 years, 10 months ago by .
Viewing 3 posts - 1 through 3 (of 3 total)
Viewing 3 posts - 1 through 3 (of 3 total)
These forums are now closed and remain for historical purposes.
None of the content applies to the new version 3. For support, get in touch via our contact form.
Forums › Forums › Search & Filter Pro › AND + OR
Hi!!
Mine is a restaurant website. All posts are organised into hierarchical categories.
Users should be able to search into children categories with OR operator, and use AND operator between groups of categories. So for instance,
Categories:
–Price
—-Low
—-Mid
—-High
–Area
—-Manhattan
—-Brooklin
—-Queens
Search: in Manhattan and low or mid priced restaurant.
Is this possible with your plugin?
If no: Is this possible with wordpress?
If no: Any workaround?
Hey Marc
Its possible, but you need to change the structure of your categories a little.
Basically, you do not want to have all those as categories.
You should create a Custom Taxonomy for Price, and a Custom Taxonomy for area. Then you can add 2 taxonomy fields to you your search form, 1 for each.
Then in the setting box, under “tags, categories & taxonomies” you would set the relationship as “AND”.
Then in each field you added, you would set the relationship as “OR”.
Please read here on a similar post for a user who had to do the same:
https://support.searchandfilter.com/forums/topic/and-filtering-not-working/#post-9913
Hope that helps!
Thanks