• Resolved okiedokeymc

    (@okiedokeymc)


    Hi,
    I’m using a Custom Post Type for my locations and gave it two custom taxonomies – one that works like categories and one that I use like post tags.

    I want to use the plugin to be able to select multiple categories and tags, so only those Posts with any of the selected taxonomy is being displayed.

    e.g. seach for locations with the tags lorem or ipsum in the categories 1 and 2

    So now when I select to categories and a few tags, I get the “no content found” message even though there are posts that share the selected tags and categories.

    Any idea on this?

    https://wordpress.org/plugins/search-filter/

Viewing 14 replies - 1 through 14 (of 14 total)
  • Plugin Author DesignsAndCode

    (@designsandcode)

    Yup, you need to use the “or” operator, check the “operators” option in the docs – http://docs.designsandcode.com/search-filter/#options

    πŸ™‚

    Thread Starter okiedokeymc

    (@okiedokeymc)

    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

    Plugin Author DesignsAndCode

    (@designsandcode)

    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? πŸ™‚

    Thread Starter okiedokeymc

    (@okiedokeymc)

    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 πŸ™‚

    Plugin Author DesignsAndCode

    (@designsandcode)

    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?

    Thread Starter okiedokeymc

    (@okiedokeymc)

    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?

    Plugin Author DesignsAndCode

    (@designsandcode)

    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…

    Thread Starter okiedokeymc

    (@okiedokeymc)

    I’m developing online now – here’s the link for you to look at. I hope you can find something.

    Plugin Author DesignsAndCode

    (@designsandcode)

    Thanks or the link πŸ˜€ Will help, can you paste your whole shortcode here pls?

    πŸ™‚

    Thread Starter okiedokeymc

    (@okiedokeymc)

    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"]

    Plugin Author DesignsAndCode

    (@designsandcode)

    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

    Thread Starter okiedokeymc

    (@okiedokeymc)

    Wow – that’s not what I expected but still: this is brilliant!

    Thank you kindly for your support (and the quick solution πŸ˜‰ )
    Resolved!

    Plugin Author DesignsAndCode

    (@designsandcode)

    Yeah you would have thought I would have thrown in a strtolower in there somewhere right? haha..

    Plugin Author DesignsAndCode

    (@designsandcode)

    PS we have just released a pro version if you’re interested πŸ˜‰ http://www.designsandcode.com/wordpress-plugins/search-filter-pro/

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘Search multiple categories and tags’ is closed to new replies.