mgibbs189

{{gist file=”test.js” lang=”javascript”}}
(function($) {
$(document).on(‘facetwp-refresh’, function() {

// if pageload and no facets are active
if (! FWP.loaded && ” == FWP.build_query_string()) {

// if on an archive page
if ($(‘body’).hasClass(‘tax-job_listing_category’)) {

// extract the term from the URI, and set it as the facet value
FWP.facets[‘membership’] = FWP_HTTP.uri.split(‘/’).slice(-1);
}
}
});
})(jQuery);
{{/gist}}