Answer the question
In order to leave comments, you need to log in
How to hide the number of items in the cart that is in the Woocomerce header?
Good afternoon. I have a question of the following nature. I am making an online store. Based on the theme of storefront and woocomerce. There is a shopping cart in the header of my website.
And it displays two values price and quantity of goods. So, how to make the quantity of goods not displayed when it is equal to 0, and if it is greater than zero, then the value is displayed in a red circle (I attach the screen)
I found a code that displays just these numbers, but I can’t figure out how to write a condition. Please help me in this matter.
<span class="count"><?php echo wp_kses_data( sprintf( WC()->cart->get_cart_contents_count() ) ); ?></span>
https://pastie.ru/view/dfb9e2ad
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question