<?php
// To call custom category and fetch the category by slug
// Change $term->slug to $term->name to display capitalize name
$terms = get_the_terms( $post->ID , 'custom-taxonomy' );
foreach ( $terms as $term ) {
echo $term->slug;
}
// Displaying full post with selected custom category
$my_query = new WP_Query( array(
'post_type'=>'news',
'posts_per_page'=>4,
'tax_query'=>array(
array(
'taxonomy'=>'custom-taxonomy',
'field'=>'slug',
'terms'=>'john-doe' // change to real slug
)
)
) );
while ( $my_query->have_posts() ) {
$my_query->the_post();
// display post
}
?>