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!

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

Devin Walker is a San Diego-based WordPress Developer and enthusiast. He is the author of several popular and highly-rated WordPress themes and plugins. In his free time he enjoys playing Golf and traveling.

Follow
Devin

Is your WordPress Running Slow?

Milliseconds are money. Website speed is extremely important. We highly recommend WP Engine. Why? Because they make a sluggish WP site fast, support is great and they have excellent uptime.

WP Engine Logo
  • Dismal

    thanks, just what I was looking for when I was trying to use the cat-description as the meta description

    • http://www.wordimpressed.com Devin Walker

      No problem!

  • Dismal

    thanks, just what I was looking for when I was trying to use the cat-description as the meta description

    • http://wordimpress.com Devin Walker

      Awesome, glad to help!

    • http://www.dlocc.com DLOCC

      No problem!