Filter different taxonomy selections without AND/OR while clearing previous?

Forums › Forums › Search & Filter Pro › Filter different taxonomy selections without AND/OR while clearing previous?

Tagged: 

Viewing 4 posts – 1 through 4 (of 4 total)
  • Anonymous
    #273428

    I am trying to figure out how to have a Search & Filter Pro set up where there are 4+ taxonomies.

    When someone selects an item under any taxonomy dropdown the results update to only posts with that selection and the other dropdowns are reset and selections from those dropdowns are not included using AND/OR.

    Is this possible with this plugin?

    Thanks!

    Trevor
    #273441

    So, you want the results to reflect only choice made in the last used field?

    The form would have to have Auto Submit OFF. It would then require some custom JavaScript to clear the other fields, and then submit the form. To trigger the submit, use JavaScript like (assuming the form has an ID of 1234) this:

    $('.searchandfilter[data-sf-form-id="1234"]').submit();

    Anonymous
    #273554

    Thank you!

    This appears to be working for me! Hope this helps anyone else too!

        $('.searchandfilter[data-sf-form-id="15"] ul select').change(function(){
    
          $('.searchandfilter[data-sf-form-id="15"] ul select').not(this).prop('selectedIndex', 0);
    
        });
    Trevor
    #273659

    Thanks for getting back to me and sharing. I will close this thread for now.

Viewing 4 posts – 1 through 4 (of 4 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.