The dropdown facet type lets users select a single value.


Available Options

Name Description
Default Label Set the label for the first dropdown option (default: “Any”)
Data Source Where the values live (taxonomy, custom field, post attribute)
Sort by Sort facet choices by Facet Count, Display Value, Raw Value, or Term Order
Hierarchical Whether to indent child terms (this option only appears if Data Source is a taxonomy)
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:

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