I try to found this code in plugin woocommerce, but i did’nt found
<mark class="count">(1)</mark>
it’s a number count for category product
check http://inst1226908-45105.crystone.net/boutique/
version woocommerce 2.5.1
I try to found this code in plugin woocommerce, but i did’nt found
<mark class="count">(1)</mark>
it’s a number count for category product
check http://inst1226908-45105.crystone.net/boutique/
version woocommerce 2.5.1
Comments are closed.
The html that you are looking for should be in your theme’s custom WooCommerce template files /wp-content/theme//woocommerce
What you are looking for has been moved to
/woocommerce/includes/wc-template-functions.php
You can simply run a filter on
woocommerce_subcategory_count_html
In WooCommerce 2.5.1 this line of code
has been moved to woocommerce/includes/wc-template-functions.php on line 539
That code used to be in a template file:
woocommerce/templates/content-product_cat.php
.But, as @silver points out in his answer, in recent changes, it’s been moved to a functions file. Note: Please see my recommendation at the bottom – this is exactly why you want to do filters, not template modifications.
If you view the code, you will see that it allows you to apply_filters to it, in case you want to modify it.
You would likely want to do that (apply filters) instead of modifying the template, however WooCommerce does offer a template override system which means that you could create custom versions of templates and locate them in your theme (within a folder title
woocommerce
inside your theme).If you wanted to modify this output, you’d do it like this. Add the following to your theme
functions.php
file:it is my strong recommendation that you avoid modifying template files if you can. In this case, you can, so rather than modifying the template, use the filters.
Why? Because there are OFTEN breaking changes in WooCommerce updates that will cause you to have to update / modify your “custom” templates. This turns into a lot of work, because Woo updates WooCommerce often, and there are often template updates.