Support

Account

Home Forums Front-end Issues How to display terms with no link Reply To: How to display terms with no link

  • Solved in this way:

    <?php $term_list = wp_get_post_terms($post->ID, 'term_name', array("fields" => "all")); ?>
                        <strong>Term name</strong> <?php echo $term_list[0]->name ; ?> 

    If you want to display a term in a if statement:

    <?php if( get_terms('term_name') ): ?>
                    <?php $term_list = wp_get_post_terms($post->ID, 'term_name', array("fields" => "all")); ?>
                        <p><strong>Term name</strong> <?php echo $term_list[0]->name ; ?></p>
                    <?php endif; ?>