Last active
September 15, 2018 11:25
-
-
Save djrmom/71ad877f466ee079dd0d137740772fde to your computer and use it in GitHub Desktop.
facetwp - click event to reset individual facet
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function($) { | |
$(document).on('click', '#reset', function() { | |
FWP.is_reset = true; | |
FWP.facets['my_facet'] = []; // set facet to no selections | |
delete FWP.facets['paged']; // remove "paged" from URL | |
FWP.refresh(); | |
}); | |
})(jQuery); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment