WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] tags automatically applied to tag descriptions

[Resolved] tags automatically applied to tag descriptions

  • 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 ‘[Resolved] tags automatically applied to tag descriptions’ is closed to new replies.
Skip to toolbar