Support » Plugin: WooCommerce » Exclude top level categories in the content-single-product.php

  • Hello!
    I managed my product-cat with top levels catgories (i.e: Item & Materials) and child categories (Chair, Couch, Table / Wood, Inox, Textile).
    The code content-single-product.php echo $product->get_categories( ', ', '<span class="posted_in">' . _n( 'Category:', 'Categories:', sizeof( get_the_terms( $post->ID, 'product_cat' ) ), 'woocommerce' ) . ' ', '.</span>' ); in the meta.php displays all the categories relative to the product by alphabetic order, but what I would like is to exclude top levels categories.
    Any idea?

  • The topic ‘Exclude top level categories in the content-single-product.php’ is closed to new replies.