When you use WooCommerce for the ecommerce on your WordPress website you may want to hide the product count in the category list view on the website. To do that without a plugin you can then add this code to your functions.php file. We recommend that you backup your WordPress website before you make updates the file on there.
Hide WooCommerce product count on category list view
/** * Hide WooCommerce product count on category list view * * @author WPSnacks.com * @link https://wpsnacks.com/ */ function woo_remove_category_products_count() { return; } add_filter( 'woocommerce_subcategory_count_html', 'woo_remove_category_products_count' );
Now if that works for you it would remove or hide the product count on category list view on WooCommerce on your WordPress website on there.
Leave a Reply