Forums Forums Search & Filter Pro How to add own class to each filter?

Tagged: 

Viewing 3 posts - 1 through 3 (of 3 total)
  • Anonymous
    #218197

    Could you please tell me how to add own class to filters like below?

    <li class=”sf-field-category” data-sf-field-name=”_sft_category” data-sf-field-type=”category” data-sf-field-input-type=”checkbox”> <ul data-operator=”or” class=””>

    <li class=”sf-level-0 sf-item-122″ data-sf-count=”10″ data-sf-depth=”0″><input class=”sf-input-checkbox” type=”checkbox” value=”suita_shi” name=”_sft_category[]” id=”sf-input-4909cfbcc336c0e8df6324a0654b8c3a”><label class=”sf-label-checkbox” for=”sf-input-4909cfbcc336c0e8df6324a0654b8c3a”>吹田市<span class=”sf-count”>(10)</span>

    Also, I would like to set category-links to each check-box, how to do that?

    Regars,

    Trevor
    #218232

    At the moment, our plugin allows you to add classes only at the input level, and not the containers outside that:

    https://searchandfilter.com/documentation/action-filter-reference/#filter-input-object

    We do plan to add more options in V3, but this is still some months away.

    You could use JavaScript to do this, but might need to trigger that more than once on the page, as shown in this post:

    https://support.searchandfilter.com/forums/topic/can-i-include-html-between-the-search-ui-fields-or-have-a-custom-search-template/#post-217539

    Anonymous
    #218825

    Thank you so much for your support.

    I will do that.

    Regards,

Viewing 3 posts - 1 through 3 (of 3 total)