Digital experiences for all disciplines
New Landing › How can we help? › Atelier › hide quantity in category dropdown
New Landing › How can we help? › Atelier › hide quantity in category dropdown
- This topic has 21 replies, 3 voices, and was last updated 8 years by Mohammad – SUPPORT.
-
Posted in: Atelier
-
January 7, 2016 at 11:35 pm #238964
is it possible without changing the HTML to hide the product quantity that appears in parentheses after a given category?
I looked at the CSS (see attached) at it is not obvious how to do this with CSS using the visibility property.
thanks!
January 8, 2016 at 9:26 am #239005Hi,
Please use this custom css code:-span.count{ display:none !important; }
Thanks
MohammadJanuary 8, 2016 at 9:50 am #239022unfortunately that did not work
i tried this, which also did not work
.dropdown_product_cat span.count{ display:none !important; }
must be the wrong selector…????
January 8, 2016 at 9:58 am #239030Hi,
Please provide me specific page url with issue.
Thanks
MohammadJanuary 8, 2016 at 10:07 am #239041it is the home page at the bottom of the page you will see i added a Search By Design option which is the cat dropdown
thanks
January 8, 2016 at 10:21 am #239052Hi,
Please provide me login detail to inspect and resolve the issue.
Thanks
MohammadJanuary 8, 2016 at 10:32 am #239060This reply has been marked as private.January 8, 2016 at 11:09 am #239077Hi,
You are using woocommerce widget that have one option to remove the count but this option is also not working. Please contact at woocommerce support https://support.woothemes.com/ about it.
Thanks
MohammadJanuary 8, 2016 at 11:42 am #239088will do. thanks for looking into this! last time i contacted woommerce it took ages before i heard back, but i will try again, as i have no choice in the matter.
January 8, 2016 at 11:49 am #239091went to the woothemes web site, tried to open a ticket, and this is the message i received. i guess everybody cashed out after the WP acquisition.
Ticket volume is currently exceeding our resources and it is taking us longer than we’d like to respond to your question. While you wait, you might consider going though our Troubleshooting Guide which happens to be the same steps our Ninjas will follow to begin troubleshooting your issue. Thank you for your patience.
January 8, 2016 at 12:02 pm #239097Hi,
Please try again: https://www.woothemes.com/my-account/?redirect_to=/my-account/create-a-ticket/ or reach out to them on Twitter also.
Thanks.
January 8, 2016 at 6:48 pm #239206Thank you for your suggestion; but I have not had luck with them in the past, and it was an exercise in frustration waiting literally weeks for an answer to some simple question. I am not keen on repeating the experience. Cheers.
January 9, 2016 at 6:16 pm #239279I am still trying to find a way to make the product counts that appear after each Product Category
in a Woocommerce dropdown menuIt turns out that .count is Woocommerce class that is used with the HTML element mark to dynamically generate
product counts by category using some sophisticated technique.I am looking for a CSS solution to prevent this count from appearing on my home page (you can see the drop down at the bottom of the HP), and attempted the following — none of which work:
mark.count {visibility:hidden !important;}
select.dropdown_product_cat .count{visibility:hidden !important;}
mark { display: none; }
ul.products .count { display:none !important; }
PHP Solutions
This WordPress forum page suggests the following “approved” approaches
/* * * Removes products count after categories name * */ add_filter( 'woocommerce_subcategory_count_html', 'woo_remove_category_products_count' ); function woo_remove_category_products_count() { return; }
or
/* action hook solution */ remove_action( 'woocommerce_before_shop_loop', 'woocommerce_result_count', 20 );
However, since I still have not learnt PHP, these suggested approaches are useless to me.
Any suggestions as to how I can tweek the CSS declarations you see above and make one of them work properly? I know this is a woocommerce thing, and I am contacting them today also, but I was wondering if any of you guys had any quick ideas in this regard?
Many thanks, as I am really stuck here.
January 9, 2016 at 6:46 pm #239283Hi,
CSS will not do this, the count is ouput in the select
<option>
and as such will need to be removed with the supplied function.Please add the function they gave you above to your child theme
functions.php
file.Thanks
January 9, 2016 at 7:04 pm #239290okay. i don’t actually have a child theme implemented *G*
do you think it is possible for me to read up on how to do this and then do what is suggested without breaking my site?i know css and javascript and how to use ftp etc but am not familiar with php or the whole child theme procedure.
so in your opinion, is it at all reasonable that someone like me who is not an WordPress backend guru to do this without courting disaster (I cannot afford at this time to pay for consultants to do it for me!)?
or is it best to just live with this category product count problem?
-
Posted in: Atelier
You must be logged in and have valid license to reply to this topic.