Support » Fixing WordPress » tags automatically applied to tag descriptions

  • Resolved swcomm


    I’m using tag descriptions as more descriptive html page titles in my tag.php template to augment SEO, but the description is being automatically wrapped in <p></p> tags in my titles. Calling it with <?php echo tag_description( $tag_id ); ?>

    How do I suppress those tags? This is a custom theme. Thanks.

Viewing 1 replies (of 1 total)
  • In case anyone else is having this issue, after doing some hunting, I resolved it by adding:

    remove_filter('term_description', 'wpautop');

    to my functions.php.

Viewing 1 replies (of 1 total)
  • The topic ‘tags automatically applied to tag descriptions’ is closed to new replies.