A few months back I wanted a way to remove the <p></p> tags from around “the_excerpt” when it is displayed in one of my Wordpress blogs.
So I asked Amit who knows just about everything Wordpress does, and/or what can be done with it. It took him about 30 seconds to come up with a nifty little plug in that does just what I wanted.
Thanks, Amit!
He did not seem as excited with it as I was, but I see that quite a few people have been asking for this same request at the Wordpress support forums so I have decided to just create a page for it in hopes that maybe others will find it as useful, as I have.
Download
no-excerpt-p.zip
Installation
Your good to go.
Of course, if you want the <p> tags around some “excerpts” and not around others you can always add the tags manually.
<p><?php the_excerpt() ?></p>
Keep up to date with the latest articles by adding my RSS feed to your feed reader, or you can also subscribe by Email
November 7th, 2007 at 7:45 pm
[...] Markup: Cleanly display code examples in a post. Get Recent Comments: Display most recent comments. No-Excerpt P: Removes <p></p> tags from around “the_excerpt” Popularity Contest: List [...]
November 28th, 2007 at 2:01 am
haha awesome guys, been trying to work this out for past couple hours
June 12th, 2008 at 6:05 am
[...] <p></p> intorno a the_excerpt per poter gestire tutto dal template. Il plugin si chiama No Excerpt P, e non fa altro che eliminare la funzione wpautop. In questo modo รจ possibile inserire il testo [...]
August 9th, 2008 at 9:59 pm
Cool, that is working like a charme.
Thankd alot man
August 21st, 2008 at 9:23 pm
[...] No Excerpt P Plugin — removes those <p> tags that appear in the default WordPress blog excerpts. Based on our tests, those P tags result in blank Yahoo! Buzz submit pages. It will be a hassle for those who want to submit your stories to Yahoo! Go ahead and try the buzz buttons on this page and see how it works. [...]
November 1st, 2008 at 8:19 am
awesome. simply awesome.
February 17th, 2009 at 10:35 am
Nice plugin but, to keep pageload down, just use …
… right before …
February 17th, 2009 at 10:37 am
OK … will try again!
just use …
…right before…
(enclosing the two statements in php tags
February 17th, 2009 at 2:11 pm
@guvnrDOTcom That’s what is inside the plug in, so there is no need to edit the theme files, just upload this plugin and activate it.
May 20th, 2009 at 2:14 pm
[...] the the fix is simple. There is a wordpress plugin specifically written to remove paragrah tags from the_excerp function. Download it, install it and problem [...]
July 8th, 2009 at 7:38 am
Thank you! This is exactly what we needed, was driving me nuts.
September 18th, 2009 at 4:11 pm
You can also just use:
the_excerpt_rss()
September 18th, 2009 at 5:08 pm
Hey Mary
Thanks for the tip!!!
October 23rd, 2009 at 1:57 am
Hey, thanks! this is the simplest method for getting rid of those tags around “the_excerpt”.
January 28th, 2010 at 2:38 pm
Cool, glad it worked.