I’m not sure if you are looking for a Taxonomy query… or a way to get terms, does one of these solutions answer your question. Please don’t downvote as I am going of very limited information and guessing here at what you need.
<?php
$args = array(
'post_type' => 'post-type',
'posts_per_page' => 5,
'tax_query' => array(
array(
'taxonomy' => 'taxname_tax',
'field' => 'slug',
'terms' => 'term-to-query'
)
)
);
$listing_query = new WP_Query($args);
?>
<?php if ( $listing_query->have_posts() ) : while ( $listing_query->have_posts() ) : $listing_query->the_post(); ?>
<?php the_title(); ?>
<?php endwhile; endif; // end of taxonomy query loop. ?>
<?php wp_reset_postdata(); ?>
// or a taxonomy lookup
<?php $terms = get_the_terms( $post->ID, 'taxonamy_tax' ); ?>
<?php foreach( $terms as $term ) echo $term->slug; ?>