Disable formatting on textarea

Add a priority to push your function to the end of the hook queue. add_action(‘the_content’, ‘my_plugin_content_hook’, 1000); Then, in your get_special_content function you will need to apply wpautop manually to the content to which you want it applied. function get_special_content() { $text=””; $autopeed = ‘content to autop’; $text .= apply_filters(‘wpautop’,$autopeed); $text .= “your textarea code”; … Read more

Disable wpautop, keep line breaks

Here’s the full solution. First disable wpautop in your functions.php remove_filter( ‘the_content’, ‘wpautop’ ); remove_filter( ‘the_excerpt’, ‘wpautop’ ); Then parse your content/excerpt with nl2br (a standard PHP function). add_filter( ‘the_content’, ‘nl2br’ ); add_filter( ‘the_excerpt’, ‘nl2br’ );

New method to disable wpautop after WP 4.3?

I guess you don’t use it at all, so why don’t you just remove the filter? remove_filter(‘the_content’, ‘wpautop’); remove_filter(‘the_excerpt’, ‘wpautop’); I’ve tested it a few minutes ago (on WP 4.3) and it works. p.s. I just saw that you use the same function. Sorry for that. What version are you using? This disables the wpautop … Read more

tech