contacts

Get All 146 Premium WordPress Themes for Just $59.99
One-Time Payment: Unlimited Use Across Unlimited Domains, Plus Free Lifetime Updates! Learn more

Remove WooCommerce Categories Count

Remove WooCommerce Categories Count

If you use WooCommerce shortcode ‘product_categories’ it will display all categories followed by products count (screenshot above).

In case you want to remove these counts, there are several different options:

Option 1: Hide with CSS

1. Login to you WordPress Admin Panel

2. Navigate to Left Menu -> Appearance -> Customize -> ‘Additional CSS’ section

3. Insert the following code:

.woocommerce-loop-category__title mark.count {
    display: none;
}

4. Save changes

Option 2: Hide with Code

1. Login to your WordPress Admin Panel

2. Navigate to Left Menu -> Appearance -> Theme Editor

3. Open functions.php for edit

4. At the end of the file (just above last occurence of ‘?>’ insert the following code:

add_filter( 'woocommerce_subcategory_count_html', '__return_null' );

5. Save changes

2 Responses to “Remove WooCommerce Categories Count”