Show Custom Taxonomy title in loop
The name of the current taxonomy term is in the name property of the term object, so, in your loop just echo it: if( $posts->have_posts() ): while( $posts->have_posts() ) : $posts->the_post(); ?> <div class=”cat-preview”> <a href=”https://wordpress.stackexchange.com/questions/114323/<?php esc_url( the_permalink() ); ?>”><?php the_post_thumbnail (‘medium’); ?></a> <h2><?php echo $term->name; ?></h2> </div><?php endwhile; endif;