Skip to content

Instantly share code, notes, and snippets.

@ethicka
Created February 3, 2020 20:27
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ethicka/263ff870541ed5e4512b545fde40049e to your computer and use it in GitHub Desktop.
Save ethicka/263ff870541ed5e4512b545fde40049e to your computer and use it in GitHub Desktop.
FacetWP: Remove Facet Count
<?php
add_filter('facetwp_facet_html', function ($output, $params) {
if ('dropdown' == $params['facet']['type']) {
$output = preg_replace("/( \([0-9]+\))/m", '', $output);
}
return $output;
}, 10, 2);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment