Comments Melanie started the conversationMarch 1, 2019 at 6:57pmHi,Is there a way to set the default filters to 'off'. They are all selected when I select the filter which makes it time consuming to unselect the ones that aren't relevant to the search. See attached.Thanks.Melanie 894Zhivko repliedMarch 5, 2019 at 8:41pmHi,We'll add check/uncheck all buttons in future update.Meanwhile you can add this code in your theme functions.php file at the bottom: add_action('wp_footer', function() { ?> <script type="text/javascript"> (function ($) { if (typeof $.stecExtend === 'undefined') { return; } $.stecExtend(function (m) { m.$instance.find('.stec-top-menu-filter-by-category ul li').each(function () { $(this).removeClass('active'); $(this).find('i') .removeClass('fas fa-square') .addClass('far fa-square'); }); m.calData.categoriesFilter = []; }, 'onAddToEventsPool'); })(jQuery); </script> <?php});This code will uncheck all categories by default. Stachethemes DeveloperMelanie repliedMarch 15, 2019 at 8:28amThanks. That worked well for Categories. Please could you give me the code for resetting the filters for Location. Thanks.Melanie repliedMarch 15, 2019 at 9:03amPlease could you also give me the code for displaying the Locations in the filter in alphabetical order. Thanks. 894Zhivko repliedMarch 20, 2019 at 12:31pmPlace the attached file to stachethemes_event_calendar/front/js/adds folder. Stachethemes Developer Sign in to reply ...
Hi,
Is there a way to set the default filters to 'off'. They are all selected when I select the filter which makes it time consuming to unselect the ones that aren't relevant to the search. See attached.
Thanks.
Melanie
Hi,
We'll add check/uncheck all buttons in future update.
Meanwhile you can add this code in your theme functions.php file at the bottom:
This code will uncheck all categories by default.
Stachethemes Developer
Thanks. That worked well for Categories. Please could you give me the code for resetting the filters for Location. Thanks.
Please could you also give me the code for displaying the Locations in the filter in alphabetical order. Thanks.
Place the attached file to stachethemes_event_calendar/front/js/adds folder.
Stachethemes Developer