FacetWP – Listify replace homepage facet names

mgibbs189

{{gist file=”test.js” lang=”javascript”}}
<script>
(function($) {
$(function() {
$(‘.facetwp-submit input’).removeAttr(‘onclick’);
$(‘.facetwp-submit input’).on(‘click’, function() {
var query_string = FWP.build_query_string();
query_string = query_string.replace(‘region’, ‘regions’);
query_string = query_string.replace(‘category’, ‘categories’);
window.location.href = ‘/listings/?’ + query_string;
});
});
})(jQuery);
</script>
{{/gist}}