You may have Googled “How to remove the p tags from the_excerpt()” or some variation and read through a bunch of results. There are some fancy workarounds, such as a stripping them out and even a plugin. While these workarounds may still work, you probably should look to use a much more simple solution.

Simply Echo WordPress’ get_the_excerpt()

You can echo WordPress’ great function get_the_excerpt that returns the value to output the data like so:

This will return the the excerpt for you without the paragraph tags, properly. I’ve had to use this several times and it works beautifully. If you have any questions please comment below.

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: