WordPress.org

Forums

WooCommerce - excelling eCommerce
Exclude top level categories in the content-single-product.php (1 post)

  1. whoaloic
    Member
    Posted 1 year ago #

    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?
    Regards.

    https://wordpress.org/plugins/woocommerce/

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WooCommerce - excelling eCommerce
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic