Saturday, July 26, 2014

Stop wordpress from automatically adding <br> tags / line breaks

I have been fed up with this wordpress "feature" that automatically adds a <br/> where you inserted a newline inside a long sentence. After some googling I found a solution. Open up wp-includes/formatting.php and search for this line:

function wpautop($pee, $br = true)

Change it into:

function wpautop($pee, $br = false)

And get a beer, enjoy the brave new world!