• Resolved sk2014

    (@sk2014)


    This is a great plugin and great support offered, thank you!

    I had a question about how taxonomy search worked in regards to ‘AND,OR’ logic.

    For example, I have 2 custom taxonomies, Project Type and Platform. Under Project Type, I select 3D Animation, and under Platform, I select Mac. My result is only posts that have both custom taxonomies included. Ideally I’d like posts of either taxonomy included.

    Here is my example url:
    http://shireenkasad.com/blog/

    and my shortcode:
    [searchandfilter taxonomies="project-type,platform" operators="or,or" types="checkbox,checkbox" headings="Project Type, Platform"]

    Is the “OR” operator between different taxonomies or within a specific taxonomy (or am I misunderstanding how taxonomy search works?)

    Thanks so much.

    https://ww.wp.xz.cn/plugins/search-filter/

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Ross Morsali

    (@designsandcode)

    Hey sk2014

    There is actually a bug with taxonomies and operators which I’ve fixed on GitHub – go grab it here – https://github.com/rmorse/search-filter

    And let me know if this fixes your problem? 🙂

    Thanks

    Thread Starter sk2014

    (@sk2014)

    Thanks so much for the quick response. I updated and still get the same result.

    Plugin Author Ross Morsali

    (@designsandcode)

    Hmmm strange, do you have a link I could look at?

    Thread Starter sk2014

    (@sk2014)

    Hey, yes, here is the link:

    http://shireenkasad.com/blog/

    Thanks!

    Plugin Author Ross Morsali

    (@designsandcode)

    Ahhhh I think I get it…

    What you want is, if you choose “3d animation” and “Mac”, you would like to show results using an “or” operator between the two taxonomies, so it would show all “Mac” results combined with all “3d animation” results, but the results should not be limited results whihc have “Mac” AND “3d Animation”?

    In this case it is not working this way because it is not designed this way – there is always an “AND” operator between different fields.

    The operator that you see described in the documentation works within each field only….

    So if your first taxonomy had “Mac” and “PC”, and I chose a different input method than dropdown (maybe checkboxes), then if I selected “PC” and “Mac” checkboxes, I could choose the operator between these two, so an “OR” operator would show all PC results and Mac results together….

    Does that make sense?

    Thnaks

    Thread Starter sk2014

    (@sk2014)

    Yes, exactly, I began to suspect the “OR” was only for within a specific taxonomy once I added more options within it. I’ll need to find another option, but it’s a great plugin regardless. I appreciate you taking the time to look into it.

    Plugin Author Ross Morsali

    (@designsandcode)

    No worries thanks 🙂 Feel free to leave a rating!

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Taxonomy 'and, or'’ is closed to new replies.