Menu Close

WooCommerce: Remove Product Category Counters


Here’s how to remove those annoying “yellow” product category counters in the WooCommerce shop / category / loop pages. You will find several versions of this snippet all over the internet…. but in case you haven’t found it yet, here’s the simple one-liner PHP code you need to add to your functions.php file.

WooCommerce Category Counters
WooCommerce Product Category Counters

Snippet (PHP): Remove the Product Category Counters @ WooCommerce Loop Pages

 * @snippet       Remove Category Counters | WooCommerce Shop
 * @how-to        Get FREE
 * @author        Rodolfo Melogli
 * @compatible    WooCommerce 5
 * @donate $9

add_filter( 'woocommerce_subcategory_count_html', '__return_null' );
View Source
Posted in WooCommerce Tips