I have a taxonomy template that display products from both parent and child terms, how can I show only the products belonging to the parent terms?
I'm trying to modify somehow this part of code:
<?php woocommerce_product_subcategories(); ?> <?php while ( have_posts() ) : the_post(); ?> <?php wc_get_template_part( 'content', 'product' ); ?> <?php endwhile; // end of the loop. ?> <?php woocommerce_product_loop_end(); ?>
and how can I show only the products that belong to the current taxonomy?