Set the number of choices selected at which “{n} selected” will display. is_tax conditional left as an example.

mgibbs189

{{gist file=”FacetWP set n selected” lang=””}}
/**
* 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 );
{{/gist}}