I have found multiple posts on stackoverflow regarding how to fix this but none of them work. I have the Karma theme and wp-ecommerce. All the <!-- html comments !-->
are being wrapped by <p>
tags by WordPress.
These do not seem to work within my functions.php file.
remove_filter( 'the_content', 'wpautop' );
remove_filter('the_content', 'wptexturize');
According to Codex the following should work
But, as you said it’s not working so alternatively you can use NoAutoP or No WPautop plugin to remove the
p tags
. Hope these will work for you.You can read this answer too, may be it’ll be helpful to you.