How to add a line break to your post

How to deal with the WordPress visual editor stripping out line breaks. How to add a line break to your post.

One of the most annoying parts of dealing with WordPress can be the issues that the Visual Editor cause. One of the biggest issues that causes problems for new users is that it often strips out line breaks.

If you hit enter a couple extra times, unfortunately that won’t help you very much once you publish the post.

Even if you take it a step further and actually add <br>’s via the HTML editor, they will still get stripped out for no apparent reason.

If you do a Google search on this issue, many people will recommend turning off the visual editor and just using the HTML version of the WordPress editor.

This is great if you are comfortable with using HTML, but what about those of us who aren’t, those of us who are just starting out with Word Press?

Turning off the visual editor for myself isn’t an option. It is an even worse solution if you are developing WordPress sites for other people.

Luckily there is an easy solution using some inline css. If you want to add some extra white space on either your posts or pages then instead of using <br> try using the following code:

<p style=”text-align: center;”></p>

Just use this code wherever you want to add a white line of space. Make sure there is nothing between the sets of brackets and that you add it in the HTML editor.

 

 

The issue of adding a line break to a post or page can be very theme specific.
Sometimes the above solution won’t work no matter how many times you try, and sometimes it simply takes a hard enter to accomplish this.
If this code doesn’t work for you, then you may want to consider changing your chosen theme. I know and have experienced the frustration of how some coding can make your live difficult.

Leave A Reply (No comments So Far)

The comments are closed.

No comments yet