How to change the search results to display everything that has been selected in the filters

Hi I hope you are well, I was wondering if I can get some help with the search side of things please.

from my understanding the search works like this…

The filter checkboxes by default work through “AND”, not “OR”, if you added all the items, then it will search for all values, and if this value is not in the listing, then nothing will be found.

Is there a way of using the filters to display everything that displays that has been filtered and not just the exact matches, so it is more of an ‘OR’ filter rather than an ‘AND’ filter, so even if the listing contains 1 of the attributes that have been selected within the search (and not all of them) they will still appear in the search.

Please see the preview link to the website, thank you.

Thank you so much in advance! I look forward to hearing back from you.

Kind regards.

Hi,

If it is a custom select attribute, then you can enable the Search any of the selected options feature in Listings > Attributes > Edit attribute, then it will be searched via “OR”.

Hi Andrii,

I hope you are well I followed these steps but I can’t see the final option for search via ‘OR’ in the edit section or on the rest of the page either. Please advise on next steps please.

Please see the screenshot below of the search section on attribute:

Hi, under the Options tab you have it checkmarked arleady, the “Search any of the selected options”. That is what andrii is saying will make the search automatically be via “or”.

Hi Aqmiami,

Thank you so much for getting back to me, I see so if it is already set to ‘OR’ then the functionality isn’t working on the frontend of the website, as when anything is selected (knowing there are listing with those attributes) nothing is showing in the results. Any ideas on why this might be the case?

Thank you so much in advance!

I tried it and it appears to only search and not or

Hi,

Please make sure that you have a listing with one of the selected checkboxes, as this option works like “search any…” and switches the option to OR. Also, we have tested this locally and everything works correctly.

Any way hivepress can have the “or” filtering option for other attributes in the future? For example, for numbers like prices, listing numbers, or other attribute types that are not select checkboxes.

Hi,

Unfortunately, it won’t work this way, because there is no selectable logic there, it will only work with the select or checkboxes attribute that has the multiple options feature enabled.

In the number range “or” in the middle of the entire range, for example, from 10 to 100, it will show listings with 11, 12, etc.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.