-
-
Save mgibbs189/aa86f510e230416041d250d9249aa853 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 to your (child) theme's functions.php, or into the Custom Hooks plugin! | |
add_action( 'wp_head', function() { | |
?> | |
<script> | |
(function($) { | |
FWP.hooks.addFilter('facetwp/flyout/facets', function(facets) { | |
return ['facet3', 'facet1', 'facet2']; // change the facet display order | |
}); | |
})(jQuery); | |
</script> | |
<?php | |
}, 100 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Unfortunately, it's not working for me. I have total 4 facets including a pager. What I want is to hide the pager from the flyout.
I have replaced facets with actual names but nothing happens, Flyout is still showing 4 facets instead of 3.
I have tried this code