add-on facet type
Range List
Create a list of custom ranges
A facet type for creating a list of filterable price / number ranges.
Setup
Final output
Configuration
Hide counts
How to hide the counts for the Range List facet, depends on the UI type setting:
UI type set to “None”, “Radio” or “Checkboxes”
Add the following CSS into your theme’s style.css
. Be aware that this also hides the counts for all facets of type Checkboxes, Radio and Hierarchy.
.facetwp-counter {
display: none;
}
If you need to be specific about which (type of) facet to hide the counts for, use any of the following styles:
/* Hide counts in all facets with a radio UI (Range List facet in UI modes "None" or "Radio", Radio facet) */
.facetwp-radio .facetwp-counter {
display: none;
}
/* Hide counts in all facets with a checkboxes UI (Range List facet in UI mode "Checkboxes", Checkboxes facet) */
.facetwp-checkbox .facetwp-counter {
display: none;
}
/* Hide counts in all Range List facets in UI mode "None", "Radio" or "Checkboxes" */
[data-type="range_list"] .facetwp-counter {
display: none;
}
/* Hide counts in a specific Range List facet in UI mode "None", "Radio" or "Checkboxes" */
.facetwp-facet-yourfacetname .facetwp-counter {
display: none;
}
UI type set to “Dropdown” or “fSelect”
To hide counts from all facets of a type that use a dropdown UI (all Range List facets in dropdown or fSelect UI mode, Dropdown facets, fSelect facets, and Hierarchy Select facets), add the following to your theme’s functions.php:
add_filter( 'facetwp_facet_dropdown_show_counts', '__return_false' );
If you want to hide counts from specific facets with a dropdown UI, 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 );