remove_filter( 'the_content', 'wpautop' );
add_filter( 'the_content', 'wpautop' , 12);
add_filter('the_content', 'remove_empty_p', 20, 1);
function remove_empty_p($content){
$content = force_balance_tags($content);
return preg_replace('#<p>\s*+(<br\s*/*>)?\s*</p>#i', '', $content);
}