Get the space you need — where you want it, when you want it, with this simple WordPress linebreak hack, all while staying in the visual editor!
WordPress keeps removing line breaks when you save your post. And that’s a problem, right? I mean, sometimes you just want some space!
I know I do. For example, I really like a line break at the end of a sublist, before going to the next item in the outer list. Like this:
- List item 1
- List item 2
- Sublist item 1
- Sublist item 2
- List item 3
For items that are short, like those above, the extra space isn’t needed. But when they are several lines long, the extra space really improves readability. (I call it “Smart Spacing” for lists.)
But when you save a post, WordPress has a habit of removing any line breaks that come at the end of a paragraph. Since it would remove the line break in the list above, the list would stay squashed.
But it isn’t squashed here, because this simple hack fixes the problem:
- Press Shift+Enter to create the line break.
- In the editor toolbar, click the “Omega” icon (Ω) to add a special symbol
- (If you only have single-row of editing icons, you don’t see the Omega option. To find it, click the “Toolbar-Toggle” icon at the end of the row — which toggles an additional row of icons. You’ll find it there.)
- Choose the first item in the table to add a “no-break space”.
- You’re almost done, at this point. But if you stop here, the extra space goes away when you save the post, along with the line break.
- Press Shift+Left-Cursor to highlight the space.
- Change the Text Color of that space!
- The crux of the hack. Since it’s only a space, the user never sees the color. But since there is some HTML there, WordPress doesn’t see it as “only a space”, and doesn’t delete it.
Copyright © 2017, TreeLight PenWorks
Add your thoughts...