Skip to content

Instantly share code, notes, and snippets.

@mgibbs189
Forked from snormand27/gist:da23358fe65c6486634396faab0ee14d
Last active April 16, 2021 06:19
Show Gist options
  • Save mgibbs189/4970bcf7360eb9f877ebb36f2ccacb8f to your computer and use it in GitHub Desktop.
Save mgibbs189/4970bcf7360eb9f877ebb36f2ccacb8f to your computer and use it in GitHub Desktop.
Code used for facetWP reload page loop
<script>
(function($) {
$(document).on('facetwp-refresh', function() {
if (FWP.loaded) { // after the initial pageload
FWP.parse_facets(); // load the values
FWP.set_hash(); // set the new URL
location.reload();
return false;
}
});
})(jQuery);
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment