Yup, you need to use the “or” operator, check the “operators” option in the docs – http://docs.designsandcode.com/search-filter/#options
π
I use the following shortcode in my widgetized sidebar:
[searchandfilter fields="search,rubriken,ausstattung" types=",checkbox,checkbox" headings=",Kategorien,Ausstattung" operators="OR" search_placeholder="Suchbegriff..." submit_label="filtern"]
I have to posts in different categories that share the same tag.
I choose category 1 and category 2 and check the tag they share – still no content found.
I’m clueless
Ah no the operators field works the same as the others (heading, types etc)
[searchandfilter fields="search,rubriken,ausstattung" types=",checkbox,checkbox" headings=",Kategorien,Ausstattung" operators=",OR,OR" search_placeholder="Suchbegriff..." submit_label="filtern"]
See if that works? π
Still no success :-/
If it’s a help, the link structure after submitting the filter looks like this:
?rubriken=barcocktailbarvinothek+bistro&ausstattung=parkplaetze
Explanation:
rubriken = custom taxonomy (same as categories)
=> barcocktailbarvinothek+bistro = selected categories
ausstattung = custom taxonomy (same as post_tags)
=> parkplaetze = seleted post_tag
And yes, I am 100% sure that I have posts in both categories that share the selected post_tag π
Hey okiedokeymc, that is strange, can you tell me what happens when the URL is:
?rubriken=barcocktailbarvinothek,bistro&ausstattung=parkplaetze
Notice, there is a ‘,’ instead of ‘+’ – which means it is using OR… do you have a link I could take a look at?
Unfortunately I don’t have a link I could give you because I’m testing the site in my local network…
But the link you posted, the one with the comma between my categories works like a charm.
Question is… why are the operators in the shortcode ignored or why could they be ignored?
Im having a look at this today to see if there is anything I can see from my end :/
It’s odd though my local copy works fine with operator fields…
I’m developing online now – here’s the link for you to look at. I hope you can find something.
Thanks or the link π Will help, can you paste your whole shortcode here pls?
π
Sure, I use the following shortcode within a text widget in my sidebar:
[searchandfilter fields="search,rubriken,ausstattung" types=",checkbox,checkbox" headings=",Kategorien,Ausstattung" operators=",OR,OR" search_placeholder="Suchbegriff..." submit_label="filtern"]
Oh dear this is so simple it hurts haha!
Operators need to be lowercase…..!!!!
[searchandfilter fields="search,rubriken,ausstattung" types=",checkbox,checkbox" headings=",Kategorien,Ausstattung" operators=",or,or" search_placeholder="Suchbegriff..." submit_label="filtern"]
AAArrggghhh
Wow – that’s not what I expected but still: this is brilliant!
Thank you kindly for your support (and the quick solution π )
Resolved!
Yeah you would have thought I would have thrown in a strtolower
in there somewhere right? haha..