can anyone explain me how to show the category title with the number of product in that category in category archive page like category 1(10)
the url is http://www.example.com/product-category/category-1/
Can anyone help me…………..
I have tried this but it display total product of the website. I want only the product in that category
<h1><?php woocommerce_page_title();
global $woocommerce_loop;
do_action( 'woocommerce_before_subcategory', $category );
echo apply_filters( 'woocommerce_subcategory_count_html', ' <mark class="count">(' . $category->count . ')</mark>', $category );
?>
</h1>
I am able to solve this
Placed this in “archive-product.php”
To list all the categories along with the product count:
If you have a category ID: