Get the term (custom taxonomy) name outside of the loop?
-
How can I get the term name outside of the loop?
This gets it as a link:
<?php echo get_the_term_list( $post->ID, 'people', 'People: ', ', ', '' ); ?>
This without the link:
$terms_as_text = strip_tags( get_the_term_list( $wp_query->post->ID, 'people', '', ', ', '' ) ); echo $terms_as_text;
But not outside loop ??
Here’s some discussion
Thanks for the help ??
- The topic ‘Get the term (custom taxonomy) name outside of the loop?’ is closed to new replies.