Support » Everything else WordPress » Random <p> and </p>

  • Resolved Ted Thompson


    Anyone know why, or better yet where, random <p>s come from in a post? I am NOT using the MCE because it keeps thinking it knows better then I do how to format the posts.

    I’m using <div> tags with the style attribute so I can customize the layout and so forth and it LOOKS A-OK. However, if I try to validate it I get errors about <p> tags being in the wrong place or </p> being there when it’s not needed.

    They show up slap in the middle of my posted code, in the browser’s source view, but when I check the post in the editor they aren’t there.

    Ergo, some piece of the code is generating them.

    I figure either

    • A – The code needs correcting
    • B – I need to hack it (rather not, makes upgrades a pain)
    • C – There might be a plugin to prevent this?

    All I want is for it to post what I wrote and stop mucking about with it…

Viewing 5 replies - 1 through 5 (of 5 total)
  • There are a number of threads on this. There’s a fix on this one, though:

    Nope, there aren’t. But since you sent me there I tried the disable wpautop plugin. It works GREAT (and I may keep it) but it doesn’t fix my problem, the <p>s persist.

    Moderator Dion Hulse


    Lead Developer

    this may be related..

    “but it doesn’t fix my problem, the <p>s persist.”
    have you started from scratch again for the post? Its only going to affect posts as they get inserted, once they’re put in with the incorrect tags i dont believe they get changed unless you re-do the post?

    I’m working too hard… I can’t recall which project this was affecting…

    Well, if I find it again, I’ll keep the new post thing in mind. I didn’t think about it working with my text before storing it in the database (doi!)


    Found it, it was the WordPress plugin throwing an extra <P> in there. I commented that line out and now it’s all good.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Random <p> and </p>’ is closed to new replies.