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

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
  • http://pulse.yahoo.com/_D7G5EJKZMNE2QJEL5TNSKPAMWI ashwani s

    nice post work fine

  • http://pulse.yahoo.com/_D7G5EJKZMNE2QJEL5TNSKPAMWI ashwani s

    nice post work fine

  • http://twitter.com/Crunchy_Cracker Crunchy Cracker

    THANK YOU!!! :)

  • http://twitter.com/Crunchy_Cracker Crunchy Cracker

    THANK YOU!!! :)