0

My WordPress page has now default autowrap with <p> settings.

Now I need to allow autowrapping only in POSTS not in PAGES. So all pages will have disabled autowrapping and only in POSTS I will have autowrapping enabled.

I tried to add this in functions.php but it doesn't work:

if( is_page() ) {
    remove_filter( 'the_content', 'wpautop' );
    remove_filter( 'the_excerpt', 'wpautop' );
}

Is there any option how to disabled autowrapping on only PAGES and keep enabled only in POSTS?

Your Answer

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

Browse other questions tagged or ask your own question.