0

I have the wpautop on remove filter for my pages but would like to turn it on just for posts and was wondering how to go about that. I'm newish to wordpress and can't figure out how to get this to work.

UPDATE: I found a working solution here: https://stackoverflow.com/a/26571012/4443707

0

You could try this in your functions.php file

function disable_wpautop_for_pages(){
   if ( is_page()){
       remove_filter( 'the_content', 'wpautop' );
   }
}
 add_action('init', 'disable_wpautop_for_pages');

I have not tried this. It's just a guess

  • thank you it didn't work, but i did find a solution – jessica mele Sep 25 '17 at 18:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.