Forums Forums Search & Filter Pro how to prevent displaying filter heading when I checked Hide empty terms?

Viewing 2 posts - 1 through 2 (of 2 total)
  • Anonymous
    #258582

    As you can see in this video: https://www.loom.com/share/ef0214c1d4ab46fcaa1b1a31a297a07f
    I have a filter that works on WooCommerce product attribute, in my shop some of attributes are related to some categories, so in other categories, filter items are not display any filter items because of checking Hide empty terms, how can I hide heading of that filter?
    I have this question about ACF filters and other type of filters, I am a back end and front end developer, so if there is a wordpress filter that I can use to solve this issue or there is a callback javascript (jquery) function that will call after ajax filter happened, please send me the related documentation.
    thanks

    Trevor
    #258593

    You would need to write some custom JavaScript that checks if any terms are showing, and show/hide the heading accordingly.

    You can use this JavaScript to run that code after the form fields have changed:

    <script>(function ( $ ) {
      "use strict";
      $(document).on("sf:ajaxformfinish", ".searchandfilter", function(){
        // run your code here again.
      });
    }(jQuery));</script>
Viewing 2 posts - 1 through 2 (of 2 total)