I’m not sure if is wordpress itself or Tiny MCE that’s doing it. But when switching between HTML and Visual editor it’s adding  , and adding an extra one each time I switch back and forth. I don’t even have a line break in the code, it seems to somehow be deciding where it wants to place them based on the tags in my html code.

What’s causing this and how do I fix it?

I’ve already tried this in the template functions file:

//disable auto p
remove_filter ('the_content', 'wpautop');
remove_filter ('comment_text', 'wpautop');
// Remove auto formatting
remove_filter('the_content', 'wptexturize');
remove_filter('comment_text', 'wptexturize');
remove_filter('the_title', 'wptexturize');

6

All I use is remove_filter( 'the_content', 'wpautop' ); remove_filter( 'the_excerpt', 'wpautop' ); and that stops WordPress from creating any extra markup. Are you copying and pasting your code from an external editor?

Tags:

Leave a Reply

Your email address will not be published. Required fields are marked *