Method 1: Using Custom Code Snippets
- Access your WordPress site’s admin area.
- Navigate to “Appearance” and click on “Theme Editor” or access your site’s files via FTP and edit the theme’s functions.php file.
- Locate the file corresponding to your active theme and open it.
- Add the following code snippet at the end of the file:
add_filter( ‘woocommerce_subcategory_count_html’, ‘hide_woocommerce_category_count’ );
function hide_woocommerce_category_count( $html ) {
$html = ”;
return $html;
}
- Access your WordPress site’s admin area.
- Navigate to “Plugins” and click on “Add New.”
- Search for the “WooCommerce Hide Category Product Count” plugin.
- Install and activate the plugin.
- Once activated, the plugin will automatically hide the product counts from WooCommerce categories.