WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] WordPress adding p tags when using the HTML tab in the editor (5 posts)

  1. zerpex
    Member
    Posted 3 years ago #

    Hello everyone..

    I'm facing this problem I'm coding a custom page, using a "Page", in the HTML tag i've been coding some HTML... All looks great, and working (I've tested outside WordPress too) - Then I save the page, go load it in wordpress - Nothing looks like it should.. I check the code.. And randomly wordpress add p-tags allover the code.. And all my code is broken - Then I manually sit in Chrome with the webkit inspector, remove all p-tags - Weird enough it's working as it should - Then I try go code that page again (I'm not even using a p tag in the code) - save the page.. And it adds the p-tags again..

    Do I have any control over the HTML tab in pages? - I would like to be able to code what that should be in that page - Not that when I've coded something, then it adds more code than I ask about..

    Can anybody help?

    Doing it both with my custom, but also the Twenty Eleven Theme.

  2. Chip Bennett
    Theme Review Admin
    Posted 3 years ago #

    It's not Theme-related.

    WordPress passes all Post content through wpautop(), which auto-adds paragraph tags.

  3. zerpex
    Member
    Posted 3 years ago #

    Is there any way I can fix that for a given page etc?

    Because I find it pretty annoying :)

    And thank you for the fast answer!

  4. Chip Bennett
    Theme Review Admin
    Posted 3 years ago #

    Is there any way I can fix that for a given page etc?

    Did you read the Codex page I linked?

  5. zerpex
    Member
    Posted 3 years ago #

    Never mind Chip, I did just read close in the link u attacted - Working now! Thank you very much!

Topic Closed

This topic has been closed to new replies.

About this Topic