Custom taxonomy query for a custom post type

I figured it out. Thanks to an answer posted here. The code is

$term_slug  = get_query_var( 'term' );
$query_args = array(
    'taxonomy'   => 'news_category',
    'term'      => $term_slug,
    'post_type' => 'news'
 );

Leave a Comment