How to force a line break in WordPress

Wordpress force line break fixMany bloggers are complaining that they can’t see how to force a line break in WordPress.  It has been a problem right from its inception to the current iteration (3.4.1 as I write). The problem stems from the way that WordPress’s inbuilt editor – TinyMCE – handles spaces and returns. Adding break and paragraph tags ( for example <br> and <p> ) within the HTML editor doesn’t work as they are stripped out upon publishing. And as for combining this with images, they float in some pretty bizarre places making the formatting of some pages look simply dreadful.

So we could try to update TinyMCE.  There is a fix we can do, but for the sake of brevity I won’t post it because every time WordPress gets updated this will be overwritten. This makes the TinyMCE fix not suitable for most people who want a permanent solution.

So here is the best solution I have found, simple and effective. It involves going into the HTML tab of the visual editor (at the top of where you type your post content). Select this and position your cursor where you want the line break to occur.

Add <br class=”blank”> anywhere you want your line break to appear, this is usually after some plain text.

Update your post and view it, you should see the elusive WordPress line break has appeared. If you have the time, please drop me a comment below if it works for you.

 

One thought on “How to force a line break in WordPress

Leave a Reply

Your email address will not be published. Required fields are marked *