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.
February 11th, 2010 at 8:55 am
It’s unbelievable, that this Plugin is needed!
Why has this tag no parameters?
Thanx a lot!
A customer wants to begin the excerpt in the same line as the title – a simple wish, I thought. But it is impossible to do with this paragraph-tag…
February 16th, 2010 at 8:49 am
Your download link is broken!
February 16th, 2010 at 8:53 am
Thanks for letting me know.
Should be fixed now.
February 26th, 2010 at 8:10 am
It worked for me…!!! Thanks dude!!!
March 26th, 2010 at 11:57 am
just call…
echo get_the_excerpt();
…instead of the_excerpt();
guvnrDOTcom solution didnt work for me.
April 22nd, 2010 at 4:43 pm
Sweet. This has been bugging me, but it’s so simple, thanks.
July 7th, 2010 at 8:10 pm
YES! Thank you!
July 14th, 2010 at 9:59 am
Hi, Ben Partch.
Thankx for uploading and making a post about it.
This help me a lot in removing the tags from the description of cu3er slider.
Once again i thank to you and Amit