Hello,
I want to remove empty <p></p> when I use WYSIWYG.
I’m using this code, but remove every p tag between the paragraphs
function acf_wysiwyg_remove_wpautop() {
remove_filter('acf_the_content', 'wpautop' );
}
add_action('acf/init', 'acf_wysiwyg_remove_wpautop');
Examples:
1.- Without the code:
<p></p>
<p>first paragraph.</p>
<p>second paragraphs.</p>
<p></p>
2.- With the code:
<p>
first paragraph. second paragraphs.
</p>
Anybody have some idea?
Thank you very much