Stop WordPress Automatically Adding br
Paulund is full of premium tutorials and support to help with your development
Sign up to get full access to all tutorials.
WordPress uses a function called wpautop to automatically add paragraphs and line breaks to your content from the content editor. This will change double line breaks and convert them into a HTML paragraph. This takes two parameters the first being the text that needs to be converted, the second being a boolean value, defaults to true which will take line breaks and convert these to line breaks. There are certain situations in your editing where you want to stop WordPress automatically adding line breaks in your content. To do . . .