Category product count removal one two three

This topic has 8 replies, 3 voices, and was last updated 6 months, 3 weeks ago ago by Luca Rossi

  • Avatar: Eddie
    Eddie
    Participant
    May 27, 2024 at 07:26

    Hi, I have tried every single step or what little I have found on this support forum about removing the category product count number. But there is simply not enough info on how to do it, nor any of code snipet plugins or coding that work.

    I have removed this from all my other site’s, it’s just this theme that simply nothing works to remove it. So frustrated, something so simple and yet so hard on this theme.

    Can someone please do me the honor to simply point me in the right direction and I can take it from there.

    I thank you very much!
    Eddie

    7 Answers
    Avatar: Tony Rodriguez
    Tony Rodriguez
    Support staff
    May 27, 2024 at 07:59

    Hello, @Eddie,

    Thank you so much for purchasing our theme and contacting our support center.

    We are writing to request further details regarding the issue you have encountered, as your initial query was not entirely clear to us. To assist you more effectively, could you please provide a detailed description of your concern or specify your exact requirements and objectives?

    Additionally, for a better understanding and prompt resolution of your issue, kindly provide the URL of the page where you are experiencing difficulties, along with screenshots clearly marked to highlight the specific areas of concern.

    Furthermore, we would appreciate it if you could create temporary wp-admin access and share the details via the private content area. This will allow us to review your settings and better understand the issue at hand and help you.

    We kindly recommend that you take a complete backup of your site before proceeding.

    We appreciate your cooperation and look forward to your response so that we may proceed to assist you promptly.

    Best Regards,
    8Theme’s Team

    Please contact administrator
    for this information.
    Avatar: Eddie
    Eddie
    Participant
    May 27, 2024 at 08:35

    Hi, thank you for your reply. All I’m asking is, how to remove the category product count number.

    The count number that shows on every product category count number.

    if ( $category->count > 0 )
    echo apply_filters( ‘woocommerce_subcategory_count_html’, ‘ (‘ . $category->count . ‘)’, $category );

    Thank you!

    Avatar: Justin
    Luca Rossi
    Support staff
    May 27, 2024 at 09:22

    Hi @Eddie,

    If you want to completely remove the category product count, please try adding this code under functions.php file locates in your child theme:

    
    add_filter('woocommerce_subcategory_count_html', 'n2t_woocommerce_subcategory_count_html');
    function n2t_woocommerce_subcategory_count_html(){
    return '';
    }
    

    Hope it helps!

    Avatar: Eddie
    Eddie
    Participant
    May 27, 2024 at 19:01

    Hi, it worked like a charm thank you very much. However, when you go into a single product, the product category count number still shows on the side product category widget.

    I included an image for better understanding.

    Thank you!
    Eddie

    Files is visible for topic creator and
    support staff only.
    Avatar: Justin
    Luca Rossi
    Support staff
    May 28, 2024 at 06:25

    Hi @Eddie,

    Please go to the Single Product Page Sidebar > under Product Categories widget > uncheck on Show Product Count:

    https://prnt.sc/j23OMuv9mfAh

    Best Regards,
    8Theme’s Team

    Avatar: Eddie
    Eddie
    Participant
    May 28, 2024 at 06:46

    Hi, thank you very much for all the heads up. Everything worked out like a charm.

    Thank you!
    Eddie

    Avatar: Justin
    Luca Rossi
    Support staff
    May 28, 2024 at 07:07

    Glad we’re able to help you!

    Best Regards,
    8Theme’s Team

  • Viewing 8 results - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.Log in/Sign up

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.