→ fSelect

Overview

The fSelect facet type generates a dropdown combo-box. It supports multi-select, and also includes a search box to narrow choices.

facet-fselect

Available Options

Name Description
Data Source Where the values live (taxonomy, custom field, post attribute)
Multi-select? If “Yes”, this facet type will accept multiple selections, and will display a checkbox-style UI.
Default Label Set the label for the first dropdown option (default: “Any”)
Parent term If Data Source is a hierarchical taxonomy and you want to display only child terms, enter the parent term’s ID.
Sort by How to sort the options (Facet Count, Display Value, Raw Value)
Behavior How the facet reacts when clicked (appears only for Multi-select)

  • Narrow the result set – “AND” operator
  • Expand the result set – “OR” operator
Count The number of options to display

Hide Counts

To hide counts from all dropdowns, add the following to your theme’s functions.php:

add_filter( 'facetwp_facet_dropdown_show_counts', '__return_false' );

If you need to hide counts from specific facets, then use this instead:

function show_dropdown_counts( $return, $params ) {
    if ( 'your_facet_name' == $params['facet']['name'] ) {
        $return = false;
    }
    return $return;
}
add_filter( 'facetwp_facet_dropdown_show_counts', 'show_dropdown_counts', 10, 2 );