WordPress.org

Support

Support » How-To and Troubleshooting » Limit Number of Term in "get the term list"

Limit Number of Term in "get the term list"

  • Hello,

    I use taxonomy terms to create titles and other content and need to limit to the first taxonomy term. Is there a way to do this?

    For example:

    <h2><?php $terms_as_text = get_the_term_list( $post->ID, 'topics') ; echo strip_tags($terms_as_text); ?> Rest of Title</h2>

    Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Limit Number of Term in "get the term list"’ is closed to new replies.