Woocoomerce remove product count from attributes

On a WordPress installation with Woocommerce I have an issue with wrong number of product count on the frontend. That’s why I decided to remove it. I have remove it from sidebars and anywhere with snippets but not on product attributes.

Is there any snipped to fix that?

Read More

enter image description here

Related posts

Leave a Reply

4 comments

  1. If you want really remove (not just hide) you need to edit your theme function.php file by adding at the end this code:

    add_filter( 'woocommerce_layered_nav_count', '__return_false' );
    

    It’s work for WOOCommerce v 3.4.3

  2. Here is a quick snippet to remove products count after categories names using WooCommerce. It’s pretty useful in particular when your main shop page list categories instead of listing products. you can put it in ‘functions.php’ file in your theme.

    add_filter( 'woocommerce_subcategory_count_html', 'woo_remove_category_products_count' );
    
    function woo_remove_category_products_count() {
      return;
    }
    
  3. i think i allready have that.

    See what functions.php file includes

    <?php
    define('ETHEME_DOMAIN', 'legenda');
    require_once( get_template_directory() . '/framework/init.php' );
    
    add_filter( 'woocommerce_subcategory_count_html', 'jk_hide_category_count' );
    function jk_hide_category_count() {
        // No count
    }
    
    add_filter( 'woocommerce_subcategory_count_html', 'woo_remove_category_products_count' );
    
    function woo_remove_category_products_count() {
      return;
    }
    

    you can swee live that is not worked at http://www.karadimos.gr/product-category/xalia/

    BTW thanx for your reply!!!