Ready to get started?Download WordPress


WooCommerce - excelling eCommerce
print checked child of SPECIFIC parent category (1 post)

  1. Alfred Degens
    Posted 10 months ago #


    Is there a way to get the selected item of a specific parent category listed in the single product page?

    I have in taxonomy "product-cat" a parent category "artists" and the names of the artists are listed as the child of parent "artists".

    In meta.php is this code:

    		$size = sizeof( get_the_terms( $post->ID, 'product_cat' ) );
    		echo $product->get_categories( ', ', '<span class="posted_in">' . _n( 'Category:', 'Categories:', $size, 'woocommerce' ) . ' ', '.</span>' );

    This code print a list of all selected categories on the product page.
    But I would like to have only the SELECTED child of "artists" printed.

    Can someone help me with this code?

    Thanks in advance,



You must log in to post.

About this Plugin

About this Topic

  • RSS feed for this topic
  • Started 10 months ago by Alfred Degens
  • This topic is not resolved
  • WordPress version: 3.6.1