Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Set {n} selected text to show after 1 selection, on all facets
- */
- function td_facetwp_selected() {
- if ( is_tax() ) {
- ?>
- <script>
- (function($) {
- $(function() {
- if ('undefined' !== typeof FWP) {
- wp.hooks.addFilter('facetwp/set_options/fselect', function(opts, data) {
- opts.numDisplayed = 1;
- return opts;
- });
- }
- });
- })(jQuery);
- </script>
- <?php
- }
- }
- add_filter( 'wp_head', 'td_facetwp_selected', 100 );
Add Comment
Please, Sign In to add comment