FacetWP – pre-select a specific value on first load

mgibbs189

{{gist file=”test.js” lang=”javascript”}}
<script>
(function($) {
$(document).on(‘facetwp-refresh’, function() {
if (! FWP.loaded && ” == FWP.build_query_string()) {
FWP.facets[‘locationdentist’] = [‘location’];
}
});
})(jQuery);
</script>
{{/gist}}