I cannot seem to get this to work, I have tried everything I can think of and spent enough time googling, to get me to seek help elsewhere.
I need to query pages in a loop, using the same taxonomy as the current page, but the child term of the current pages term.
taxonomy = walls current page term = art queried pages taxonomy = art queried pages term= modern-art ( where art is the parent term of modern-art)
I can do this using
$args = array( 'post_type' => 'page' 'orderby' => 'menu_order', 'order'=>'ASC', 'tax_query' => array( array( 'taxonomy' => 'walls', 'field' => 'slug', 'terms' => 'modern-art' ) )
However, I need this code to be dynamic and fetch the data. So I can use the same template of lots of different parent and child terms.