Removing unneccessary p-tags (Not every p)

If what you want is really only to prevent WordPress from adding empty <p></p> and you’d be happy with removing those after post retrieval from the database, then function wpse108194_remove_empty_paragraphs( $content ) { $content = preg_replace( ‘#<p>\s*</p>#’, ”, $content ); return $content; } add_filter( ‘the_content’, ‘wpse108194_remove_empty_paragraphs’, 11 ); will do.

Remove wpautop from specific shortcodes only

Well, there is a script out there. The author claims that it removes the wpautop form individual specific shorcodes. You’ll find it here. Add this to your functions.php or your plugin like below- // Here I assumed that you kept the name of the PHP script file same include “shortcode-wpautop-control.php”; And then call the function … Read more