I see a lot of posts here and elsewhere having trouble adding line breaks for some reason, but I'm trying to remove them. I'm new to WP, and I see that when editing in "HTML" mode the text is rendered in paragraph tags for double line breaks, and <br> for single line breaks, without the need to write the HTML. This is nice, but when I format the code manually by adding the <p> tags myself, I still get <br>s in the output. Example input in the editor:

I don't want
HTML line breaks.

My output:

I don&#8217;t want<br />
HTML line breaks.</p>

I could remove all the line breaks in the source input, but that's really quite tedious and makes things harder to read in the editor. Is there any way to make WP ignore line breaks (not create <br>) when the content is already wrapped in <p> tags?

I'm using the defaults for everything on a new installation.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.