Вывод ссылки на рубрику и таксономию поста в цикле
// category
<?php $categories = get_the_category();
echo '<a href="' . esc_url( get_category_link( $categories[0]->term_id ) ) . '">' . esc_html( $categories[0]->name ) . '</a>'; ?>
//taxonomy
<?php $terms = get_the_terms( $post->ID, 'cat' );
if( $terms ){
$term = array_shift( $terms );
echo '<a href="' . esc_url( get_category_link( $term->term_id ) ) . '">' . esc_html( $term->name ) . '</a>';
} ?>