FacetWP – set a default category on pageload

mgibbs189

{{gist file=”test.js” lang=”javascript”}}
(function($) {
$(document).on(‘facetwp-refresh’, function() {
if (! FWP.loaded && FWP.facets[‘categories’].length < 1) {
FWP.facets[‘categories’] = [‘motor’];
}
});
})(jQuery);
{{/gist}}