WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] tags automatically applied to tag descriptions (2 posts)

  1. swcomm
    Member
    Posted 3 years ago #

    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.

  2. swcomm
    Member
    Posted 3 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic