FacetWP – set pre-selected facet choices data in the URL

mgibbs189

{{gist file=”functions.php” lang=”php”}}
<script>
(function($) {
$(document).on(‘facetwp-loaded’, function() {
if (! FWP.loaded) {
FWP.parse_facets(); // parse the DOM to get the facet selections
FWP.set_hash(); // update the URL bar
}
});
})(jQuery);
</script>
{{/gist}}