Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I am tired of WordPress's horrible HTML editor and have decided to write all my html in Notepad++ and then just copy it over. However, simple line breaks "\n" that would be normally ignored in html are converted to <br /> tags. I have disabled the visual editor, so everything I save should be the exact html that is presented. But it's not. how do I stop wordpress from converting my html?

share|improve this question
    
Well, the <br /> tag is exactly a line break in HTML. If you use line breaks in Notepad++ to create new paragraph just make two line breaks, WordPress will end the previous and begin a new paragraph. If you don't want line breaks in your post then why did you make them when writing the post in Notepad++? –  Mateusz Hajdziony Nov 19 '12 at 1:06
add comment

1 Answer

That's handled by a filter called wpautop (declared in wp-includes/formatting.php, line 189).

You can remove it with this:

remove_filter ('the_content','wpautop');
share|improve this answer
    
You can also do this using plugin wpautop control and set site-wise default as well as per post setting. More info at blog.bigsmoke.us/2010/12/09/wpautop. –  ShitalShah Apr 11 at 1:05
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.