I want the remove wpautop filter working only on posts from my blog. Because at some pages i need the autop, and at some pages i need it to not be there.
I use the following rule and it is in my theme's functions.php:
remove_filter( 'the_content', 'wpautop' );
Because I only want it on blogposts I was thinking about an if statement, I searched the conditional tags page in Wordpress and found out I can use is_single .
But it doesn't work.
This is the code I use now.
if(is_single() ){
remove_filter( 'the_content', 'wpautop' );
}
It is still wraped by an p.
And even if it would have worked, there is an other problem. That is that is_single effects ALL singles from post types. And I only want the single of a blog post(posts).
Anyone know how to fix it?