Last active
September 30, 2020 19:54
-
-
Save djrmom/4b3cd25d08ce2036a1df326963785824 to your computer and use it in GitHub Desktop.
facetwp set order of (or remove) flyout facets
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action( 'wp_footer', function() { | |
?> | |
<script> | |
(function($) { | |
if ('object' !== typeof FWP) { | |
return; | |
} | |
FWP.hooks.addFilter('facetwp/flyout/facets', function(facets) { | |
return ['facet3', 'facet1', 'facet2']; // change the facet display order | |
}); | |
})(jQuery); | |
</script> | |
<?php | |
}, 100 ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function($) { | |
if ('object' !== typeof FWP) { | |
return; | |
} | |
FWP.hooks.addFilter('facetwp/flyout/facets', function(facets) { | |
return ['facet3', 'facet1', 'facet2']; // change the facet display order | |
}); | |
})(jQuery); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment