Если правильно вас понял то, я юзаю это.
<?php
$term = $wp_query->queried_object;
$getterm = $term->slug; // get current slug (E.g. activity_running)
$posts = get_posts(array(
"post_type" => "posttype",
'tax_query' => array(
array(
'taxonomy' => 'taxonomies,
'field' => 'slug',
'terms' => $getterm,
'include_children' => true,
'operator' => 'IN'
),
),
"numberposts" => "-1",
'post_status' => 'publish',
'order' => 'DESC',
));
?>
<?php
foreach ($posts as $post){
setup_postdata($post);
?>
html
<?php
}
wp_reset_postdata();
?>