Support » Fixing WordPress » HTML code dissapearing!

  • I usually use the HTM Editor for creating posts and pages on wordpress. Often, I’ll use line breaks in the HTML editor, but when I switch to the Visual Editor, the line breaks disappear. Is there any reason for this?

    I was told to use the <code></code> function for inserting HTML, but it dosen’t work. Here’s an example of that it looks like in the HTML Editor:

    <h2>Topic 1</h2>
    <p>Blah Blah Blah</p>
    </br>
    <h2>Topic 2</br>

    This works fine on the page during the preview, but once switched to the Visual Editor, and back to the HTML Editor, the breaks are gone.

    Any help or suggestions?

Viewing 3 replies - 1 through 3 (of 3 total)
  • yes, this happens a lot. what I do to get around this problem is to change to html view at the end and add your code. Then save the post from there. Else if you go back to the Visual editor, it will be so very nice to auto format for you taking out all the code you just added.

    Fantastic, just glad to know I’m not going crazy. Thanks for the reply.

    Often, I’ll use line breaks in the HTML editor, but when I switch to the Visual Editor, the line breaks disappear. Is there any reason for this?

    Yes, switching back and forth between the visual and html editors will mess up your code. Use only one or the other.

    I was told to use the function for inserting HTML…

    You were told wrong unless you want to display the code example in your text.

    BTW, line breaks <br /> can be automatically generated in WordPress by a single enter (return) when typing in your text.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘HTML code dissapearing!’ is closed to new replies.