Hey, there — I’ve used the following function successfully on another website to display both the link and the name of a term. For some reason it only displays the link and not the name of the tag on the website I’m developing currently. Any thoughts? Thanks!
function bloaut() {
?>
<?php
$terms = get_field('blonam');
if( $terms ): ?>
<?php foreach( $terms as $term ): ?>
<a href="<?php echo esc_url( get_term_link( $term ) ); ?>" class="aut">Written by <?php echo esc_html( $term->name ); ?></a><br/>
<?php endforeach; ?>
<?php endif; ?>
<?php
}
add_action('hook_top_con', 'bloaut');