I'd like to exclude specific items

Forums › Forums › Search & Filter Pro › I'd like to exclude specific items

Viewing 3 posts – 1 through 3 (of 3 total)
  • Anonymous
    #214668

    Thank you for the great plugin.
    I’m Japanese.SO my English may be not good.Sorry…

    I want search to exclude specific items.For example,It excludes specific allergens.
    example)https://www.pochi.co.jp/item_allergy_search.html

    Can it do that?

    Trevor
    #214723

    Instead of including terms, which is what our plugin does, you want to exclude them. I am sorry, but this is not a feature of our plugin.

    I think it might be possible though, with custom coding. You would need to use the https://searchandfilter.com/documentation/action-filter-reference/#edit-query-arguments filter.

    This post discuss something similar:

    https://support.searchandfilter.com/forums/topic/include-and-exclude-category/page/2/

    BUT, in your case, you have to change the 'operator' => 'IN', part of the query for the field to 'operator' => 'NOT IN',

    I will ask Ross, the plugin developer, if he has some further thoughts on this.

    Ross Moderator
    #215163

    Hi Kie

    What Trevor says is correct, you can use our filter sf_edit_query_args to restrict the results to certain categories or taxonomies, or exclude them, for example.

    Let us know how you get on.

    Thanks

Viewing 3 posts – 1 through 3 (of 3 total)
Search & Filter Support
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.

We also use cookies to store items in your cart as well as allowing your to login on the site.

You can adjust all of your cookie settings by navigating the tabs on the left hand side.

By continuing to use this site, you also agree to our Privacy Policy.