Reputation: 135
I don't want my WP editor to remove br
and p
tags when I'm saving and I don't want to install TinyMCE to achieve it. Just want to use br
and p
tags in WP default editor.
Is there a good way?
Upvotes: 3
Views: 3366
Reputation: 712
Bit of a necro, but for the <p>
tag you can add a class or perhaps another property.
e.g.
<p class="nothing-relevant">Foo</p>
will not be stripped (using Gutenberg).
Upvotes: 1
Reputation: 7720
there are plugins that are more accurate, but you can just add these lines in functions.php
remove_filter( 'the_content', 'wpautop' );
remove_filter( 'the_excerpt', 'wpautop' );
See more info here
Upvotes: 0