Forums

[resolved] Extra HTML (7 posts)

  1. rzea
    Member
    Posted 2 years ago #

    Hello,

    WordPress is adding extra <p> tags in my code. I'm using the HTML tab to paste the code.

    Here's what's happening:

    </div>
    <p><!-- END Slider --></div>
    <p><br class="clear" /></div>

    See the extra <p>'s?

    It's not a plugin, I don't have any plugin installed at all.

    I have already taken out all the spaces between the HTML tags (something I shouldn't have to do at all) and out of 6/7 HTML errors I had only 1 error remains (I can fix one of the <p>'s you see above, but I left both to show the kind error I'm getting).

    I've searched the forums before posting but there is only one similar forum but no one has been able to solve that issue either.

    --

    This is very disapointing, although I'm not new to HTML this is my first time using WordPress to build a website because I heard very good comments about it, but now I'm trying such a simple thing which is copy HTML code from Dreamweaver to the HTML tab in WordPress and WordPress welcomes me with this absurd problem.

    If there's no way to solve this, I will have to dump WordPress for another CMS. I honestly do NOT want to do it, but seems I'm being forced to do so.

    Thanks for any help you can provide on this issue.

  2. iridiax
    Member
    Posted 2 years ago #

    Try having no spaces or no new lines (as you do above) between tags and no html comments.

  3. iridiax
    Member
    Posted 2 years ago #

  4. doc4
    Member
    Posted 2 years ago #

    rzea,

    You might try the TinyMCE Advanced plugin which has an option to prevent this sort of behavior. http://wordpress.org/extend/plugins/tinymce-advanced/

  5. rzea
    Member
    Posted 2 years ago #

    Perfect iridiax, the Disable WPAUTOP solved the problem.

    Not sure if I want to install TinyMCE, the author says it installs 15 plugins and I'm not sure I really need all that.

    Anyway, this issue is solved.

    Thanks guys.

  6. Brianair
    Member
    Posted 1 year ago #

    The wpautop filter changes BR and P tags.

    To force a line break, use this:

    <br clear="none" />

    Valid? I don't know, but wpautop ignores it. That's pretty easy relief!

  7. woogychuck
    Member
    Posted 1 year ago #

    This hack isn't really workable as it clears out all the legit p and br tas.

    This seems like an insanely easy fix for the WordPress team. Add a hidden field to the editor page that's value changes when you click the HTML tab.

    Then it would be easy to create filters that only work in a specific mode and this problem could be averted.

Topic Closed

This topic has been closed to new replies.

About this Topic