mbalara
Member
Posted 2 years ago #
Easy question: when I use the_excerpt, it spits out the content enclosed in <p></p>. How do I makes those go away? I.e. how do I get *just* the content that's actually in the excerpt field?
More complicated background info: I've just imported over 260 posts into WP from MT. In MT I was using the excerpt field in each post for one image name, but without .jpg on the end. Yes, a dirty, filthy, stinking hack.
*If* the_excerpt would leave the <p></p> out, then what I need would look something like this: <img src="<?php the_excerpt(''); ?>.jpg">.
hands down, the nicest plugin for handling all sorts of text problems is Text control, http://dev.wp-plugins.org/wiki/TextControl
what you are fighting against is called wpautop, there are other plugins that allow you disable it on a post to post basis, this one allows that, as well as allowing for a default way to handle all posts.. it also lets you use markdown, textile, etc..
As for your last request there.. i dont have a clue.
Hello
Here is a plug in a friend made for me to do just that
http://benpartch.com/forum-examples/no-excerpt-p.zip
Just upload it to your wp-content/themes folder and then activate it in the control panel.
mbalara
Member
Posted 2 years ago #
@whooami: Um, which last request? I actually only had one. If that plugin will get the <p></p> out, then I'm good to go. Thanks!
mbalara
Member
Posted 2 years ago #
@BPartch: Oh oh oh! Even better! Thanks!