Digital Designer

Disappearing line breaks in WordPress posts

Category : Wordpress · by Jul 30th, 2014

This is something that has been bothering me for the past few months, and I am adding here so I can always find the (very simple) solution.

Recently when adding posts to one of the sites I run I was having issues with my line breaks, <br>, disappearing. This is due to the WordPress editor tidying up the code and removing empty values. That seems fair enough, but can be extremely frustrating when trying to tidy the layout of your post.


The workaround for this is to use the text view of your post and add the line break through HTML, with a class added to it. The below will ensure that your line breaks will not be removed and your formatting will stay as intended..

<br class=”blank”>





Image taken from


+Thomas Geraghty