Remove wpautop from all posts/pages except my custom post type

You can perform a conditional test against the current post type, like this:

if ( 'events' != get_post_type() ) {
    remove_filter( 'the_content', 'wpautop' );
}

Leave a Comment