Archived topic
Remove Product Count - Product Attributes
5 replies · Started by John on May 16, 2018
Hello, hope you can help.
I have a client e-commerce site where we have used the widget 'Filter Product by Attribute' in the left Sidebar. We have selected display as list called shop by interest:.
https://goodhealthboutique.co.uk/shop/
It is working fine, but besides each attribute it puts a count. eg. Vegan (7). My client would like to remove the count figure.
Unlike the Product Categories widget - where there is an option to tick Show Product Counts - there does not seem to be a way to switch this function off.
I've tried looking for a solution / snippet to achieve this. But no luck. Are you able to help / point me in the right direction?
Many thanks
John
Hi John, there possibly is a filter for this, are you happy with using CSS to hide? If so try this:
.woocommerce-widget-layered-nav ul li .count {
display: none;
}
Hi David, Thank you. That worked perfectly!
Really appreciate it. Client will be happy.
John
You're welcome John - odd that the widget misses that feature. And generally i find the product counts to be a little bit hit and miss!
Yes, the feature is on the Product category widget. But not the Filter by Product one. If you select display Dropdown - rather than List - that works. But it is not an elegant solution.
Thanks again.
John
Sorry, that should read Filter By Attribute one. j