How to hide icon counter if value is zero “0” (is empty)?
-
Hello how are you? I hope well!
How to hide icon counter if value is zero “0” (it’s empty)?
For example:
the counter above the heart icon has the following structure:< span class="count-number" > < ? php echo yith_wcwl_count_products() ; ?> < / span >
I tried as follows:
< ? php if( YITH_WCWL()->count_all_products() > 0 ) : ?> < span class="count-number" > < ? php echo yith_wcwl_count_products() ; ?> < / span > < ? php elseif; ? >
… but without good results.
It’s working perfectly, I just want to know if I can add a “class” or another function that hides it when it’s empty.
The complete code of theme: https://app.screencast.com/XdAsARSWQ9ZOk
I use a child theme and …. Sorry for the amateurism, I’m just getting started.
Thanks ^^
Hugs.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘How to hide icon counter if value is zero “0” (is empty)?’ is closed to new replies.