how to remove the automatic insertion of <p> </p>
in text entry fields only, not in visual editor…
I put this in my function.php
remove_filter( 'the_content', 'wpautop' );
remove_filter( 'the_excerpt', 'wpautop' );
It remove the auto <p>
tag both text and visual editor
is this possible to remove the <p>
tag in text editor
only… not in visual.
Paragraph tags are added when the Posts content is displayed and not when its stored in the database. You will not notice the paragraph tags when switching from Visual to Text mode or even when you view the posts content stored in the database using PHPMyAdmin or some similar means.
Check the following link to see the list of filters are applied when database writes happen for Post, Pages & Attachments
http://codex.wordpress.org/Plugin_API/Filter_Reference#Database_Writes