Why WordPress HTML editor remove <p> tag and <br>? Can we stop this?

I need to make some static pages in WordPress I like to make it through HTML editor as I need to change text regularly. My page layout is not looking good as the HTML editor removing <p> and <br> tags.

For example if I am entering below HTML in editor through ‘text’ mode.

Read More
<p>Some Text</P>
<a>google.com</a>

click on ‘Visual’ tab and again switch to ‘text’ mode, then the HTML will change like below.

Some Text
<a>google.com</a>

I have installed “Tinymce-advanced” and configured setting to stop removing <p> tag and <br/> tag. Then it stop removing <p> tag but then the editor start adding <p> tags randomly for example then above HTML code will be looking like below.

<p>Some Text</p>
<p><a>google.com</a></p>

Kindly share your suggestions

Related posts

Leave a Reply