On a page like taxonomy-product_cat.php - this function lists just the products for the called sub-category - bags:
$args = array( 'post_type' => 'product', 'product_cat' => 'bags') $loop = new WP_Query( $args ); while ( $loop->have_posts() ) : $loop->the_post();
I can hardcode list all the sub-categories and then dynamically list the products. I want to dynamically create the subcategory list with the associated products listed with it - what is the best way to do this? I am thinking that if I make the 'product_cat' => dynamic - is a way to achieve this?