• My WordPress Editor removing the <p> tags from the HTML content.

    For example I wrote below HTML content in HTML WP editor, then I switched to “Visual” editor mode and came back to “Text” mode then. I have following result.

    Before switching to “Visual” mode
    <p>This is an example</p>
    Google

    HTML after switching to “Visual” mode.

    This is an example
    Google

    I have installed “tinymce-advanced” and checked “Stop removing the <p> and
    tags when saving and show them in the Text editor”.

    Then I got the output like below.

    Before switching to “Visual” mode
    <p>This is an example</p>
    Google

    HTML after switching to “Visual” mode.

    <p>This is an example</p>
    <p>Google</p>

    I also tried “remove_filter (‘the_content’, ‘wpautop’);”, I can find out that it won’t make any differences in the behavior of HTML editor.

    How can I stop this behavior of HTML editor?

    Please share your thoughts on this.

Viewing 1 replies (of 1 total)
  • I think this is known behaviour. The visual editor removes some other tags as well. I always use the text editor because of this.

Viewing 1 replies (of 1 total)
  • The topic ‘WordPress Editor p tags from HTML content’ is closed to new replies.