hey,
i am trying to create a search form which will ALWAYS display results, even if there are only partial results.
For example: say, a recipe search according to tags. let's say we have tags checkboxes and the user checks 4 of them (for example bacon, tomato, olives, lettuce). I don't have a recipe which has all 4 ingredients, so I want to show the CLOSEST results I can, maybe just 3 ingredients + I want to show which one is left out. A little like in google search.
Is this in any way possible?
Thanks!
Dear Ido,
I suggest you setup the "ingredients" as a custom taxonomy, then you will be able setup a filter in the view:
Select posts with taxonomy:
Categories slug in one of those set by the URL parameter wpvcategory
eg. hidden link
See our document:
https://toolset.com/documentation/user-guides/filtering-views-by-taxonomy/
Value set by URL parameter Enter the name of the URL parameter in the second argument. If you add a custom search by a taxonomy, this filter will be added automatically. You can filter by multiple values, so you can set the operator that will be used: IN, NOT IN or AND.
thanks
i'm not sure i got it, i want it to look something like this:
hidden link
i still want to understand if you have time explain, but not urgent, i think i'll just use this theme, it does the job.
thanks!
hey again,
i'm now almost certain you didn't understand what i was trying to achieve.
i know how use a taxonomy search, that's not the problem.
what i was trying to achieve is:
instead of showing NO RESULTS when i choose (for example) 3 taxonomies that don't match, i want to show CLOSEST results:
"say, a recipe search according to tags. let's say we have tags checkboxes and the user checks 4 of them (for example bacon, tomato, olives, lettuce). I don't have a recipe which has all 4 ingredients, so I want to show the CLOSEST results I can, maybe just 3 ingredients + I want to show which one is left out. A little like in google search."
you kind of didn't answer that...
thanks!
ido