I’m using this code to display taxonomy terms:
<?php
$features = get_field('grid_selected_features');
if( $features ): ?>
<ul>
<?php foreach( $features as $term ): ?>
<h2><?php echo esc_html( $term->name ); ?></h2>
<?php echo esc_html( $term->description ); ?>
<a href="<?php echo esc_url( get_term_link( $term ) ); ?>">View all '<?php echo esc_html( $term->name ); ?>' posts</a>
<?php endforeach; ?>
</ul>
<?php endif; ?>
The permalinks are working, but the term name is not displaying.