A quick hack to disable the wpautop() function’s tendency to mangle your WordPress-based HTML posts with extra markup:
Add the following to your functions.php:
function custom_autop($p, $br = 1) {
if (stristr($p, '<!--noautop-->')) {
return str_ireplace('<!--noautop-->', '', $p);
} else {
return wpautop($p, $br);
}
}
remove_filter('the_content','wpautop');
add_filter('the_content','custom_autop');
That’s it. Now when you add <!–noautop–> to a post, it’ll disable the wpautop() function.
Incidentally, wpautop has a parameter called “$pee” and a loop that reads “foreach( $pees as $tinkle )” …
