Viewing 15 replies - 16 through 30 (of 42 total)
  • I used both above codes and they worked but removed the number count as well how would I just remove the yellow highlight? I want it to show the number of products but not with the yellow highlight?

    Thread Starter drakedanner

    (@drakedanner)

    Murray644,

    Did you try using Flooshy’s suggestion?

    You need to add !important; after your background color in your style.css file.
    It should look something similar to:
    body.custom-background {
    background-color: #color code;
    }

    so it becomes:
    body.custom-background {
    background-color: #color code !important;
    }

    give me the link to your site if you want me to have a look

    I actually added this:

    mark{ background:none; }

    and it worked

    Thanks so much!!!!

    Thread Starter drakedanner

    (@drakedanner)

    Interesting, I’ll have to remember that one. You’re welcome and thanks!

    I tried this:

    ul.products .count { display:none !important; }

    and

    mark {
    display: none;
    }

    and

    mark{ background:none; }

    but no one seems to be working

    https://blumedise?o.com/tienda/?page_id=119

    ?? :(, it still shows the product count? What can I do? please help me!!!

    thanks in advance

    You can customize the theme to remove this:

    copy /plugins/woocommerce/templates/content-product_cat.php
    to /themes/YOURTHEME/woocommerce/content-product_cat.php

    Remove the bit that says: $category->count

    By copying the theme file to your own theme directory in a woocommerce folder your changes won’t be broken the next time you update woocommerce.

    Hope this helps.

    Thank you, salonmonster! Problem solved!

    To completely remove the product count shown against each category, just paste the following line into the “Edit CSS” page under “Appearance” in the WP admin area:

    Mark.count{visibility:hidden;}

    Can’t remember where I originally found this, but it did the job for me!

    James ??

    Playing around with CSS isn’t very efficient. It is far safer (and easier) to turn it off using the filter WooCommerce added a few months back.

    relativist

    (@relativist)

    hey there @bftrick, i don’t see the filter in the updated woocommerce, though the link you provided says it should be included as part of 2.x. am i missing it?

    relativist

    (@relativist)

    actually, i’m also noticing that the category count doesn’t show in chrome, but it is showing in safari. :/

    relativist

    (@relativist)

    nope sorry. cleared cache and all working well. thank you!

    Anonymous User 5466832

    (@anonymized-5466832)

    The best way to do this is not to hide (display: none) or use JQuery, or to have to add another template file (moving content-product-cat.php into your child theme), but to simply re-write the function that does this output.

    Of course, this will remove the Showing results functionality site-wide. In my case, that’s what I wanted, I just did not want it showing the number of products anywhere because it will always be a very small number per page or product.

    To do this, place this code in your functions.php file:

    /** Remove Showing results functionality site-wide */
    function woocommerce_result_count() {
            return;
    }

    monto

    (@monto)

    Thank you Flex perception… that was a wonderful solution

    thecookiemonster

    (@thecookiemonster)

    Thanks for this fix, its what i was looking for, can someone tell me how to remove the cat name that is displayed as well?

Viewing 15 replies - 16 through 30 (of 42 total)
  • The topic ‘Remove the Product Count on Woocommerce Categories’ is closed to new replies.