Wordpress - Remove wpautop from shortcode content / remove whitespace in buffering
You do not need a plugin to do this. Just add 3 lines of code to the end of the functions.php
file in your active theme:
remove_filter( 'the_content', 'wpautop' );
add_filter( 'the_content', 'wpautop' , 99 );
add_filter( 'the_content', 'shortcode_unautop', 100 );
shea's answer is a nice solution, but it turns off autop for all shortcodes which may not be desired.
I wrote a script that allows you to run the following:
include "shortcode-wpautop-control.php";
chiedolabs_shortcode_wpautop_control(array('yourshortcode'));
It allows you to turn off wpautop for specific shortcodes instead of all of them.
Once again, I wrote the script. I don't mean to self promote, but as I update it in the future, I will update it on GitHub, so it makes no sense to post the code here.
You can see the script at Shortcode wp-autop control.