Prevent WordPress from Inserting Paragraphs on Cat Description

Prevent Auto Parapgraphs for WP Category_description

Typically if you want to pull a category description you’d use WordPress’ handy category_description(); function. The problem some people have is with paragraph tags being inserted automatically by WordPress.

Solution: Filter out the Paragraph Tags

Simply insert the following filter into your WordPress theme’s functions.php file and enjoy your category descriptions paragraph free!

remove_filter('term_description','wpautop');

Thanks to the category_description return paragraph tag thread on WordPress Forums for this quick and easy filter.

5 thoughts on “Prevent WordPress from Inserting Paragraphs on Cat Description

Leave a Reply

Your email address will not be published. Required fields are marked *