I've created a query working fine pulling posts from a specific taxonomy—but before I had only 7 taxonomies that were permanent, now I have sub taxonomies under that main taxonomy and they will be dynamic.
Any ideas of how I might be able to write this but have a for-each loop going through this query for any taxonomy that is a child of the main taxonomy (in this example the parent taxonomy is 'Cameras')
So again: I have 7 parent taxonomies ('Cameras' is one) and each one has a dynamic amount of sub taxonomies, i'm trying to create a for each loop that will allow me to do the following without writing the query for each specific sub-taxonomy.
Thanks
<h2>Cameras</h2>
<ul>
<? $args = array(
'post_type'=> 'rental_gear',
'type' => 'cameras',
'order' => 'ASC',
'posts_per_page' => '-1'
);
$the_query = new WP_Query( $args );
if($the_query->have_posts() ) : while ( $the_query->have_posts() ) : $the_query->the_post();
?>
<li class="equip-li"><a href="<? the_permalink(); ?>">› <? the_title(); ?></a></li>
<?php endwhile; endif; wp_reset_postdata(); ?>