The post’s title has more the sense of Ali vs Foreman than of Coke vs Pepsi. True, both are contests, but the the latter is a selection — the former is a fight. This post is about a major problem some posts created using the Classic Editor have when displayed in the WordPress Reader.
Specifically, breaks between paragraphs are lost. In some cases an entire post becomes one long paragraph. The only breaks come from the various HTML block elements that force paragraph breaks. (Things like horizontal rules, large images, or tables.)
Here I’ll explain what’s going on and how to get your paragraphs back.
Let me start with the elephant in the room, the WordPress Classic Editor. I know I’m not the only one who clings to it.
Let me be very clear it’s not that the new Block Editor is so awful. For me it’s simply that it’s too much. Way too much. I write long-ish blog posts with the occasional image. What I need is a good text editor — one that gives me the writing tools I’ve become accustomed to. Treating paragraphs as individual blocks interferes with this because writing often involves merging, breaking, and moving parts of paragraphs.
I’m aware the BE has a Classic Mode, but it just proves my point. An editor so different and so packed with features that it contains an emulation of a simpler editor is more editor than I want to deal with.
But I don’t intend this as a rant against the BE (I’ll save that until I’m forced to know it better and can really complain). My only point is I don’t use it because, for my needs, the CE is cleaner, easier, and better.
WordPress, however, would like to retire it — they’ve repeatedly threatened to. They want everyone using the BE. I can appreciate that from a certain point of view, but I’ve long thought software should offer multiple faces to different kinds of users. (For instance: Casual, Frequent, and Power.)
So I think there’s a benefit to keeping the CE. (Again: I’m not at all opposed to the BE; I just think it should co-exist with the CE.)
If the logic is that posts need the new BE formatting (lots of HTML comments), then what about all the legacy posts stored in the database that were created with the CE? If WP intends to require codes inserted by the BE to display posts, what happens to what must be millions of legacy posts?
The way the Reader grays out older posts suggests they don’t understand that some blogs create more timeless posts than others. Some blogs create posts that others may reference for many years. Many of my posts fall into that category, and I’m offended WP grays those out.
I’ll get to the Reader later. First let’s talk about paragraphs.
You’ll need to know a little about HTML (Hyper-Text Markup Language), which is the language of the web. Pretty much everything our browser shows us comes to it written in HTML. (One exception is images.)
The thing about HTML is that you could write it with paper and pen; it’s just text. When learning a new programming language, it’s traditional that your first program be one that simply says “Hello, World!” HTML is not a programming language, but here is a “Hello, World!” HTML page in its entirety:
<html> <head> <title>Hello!</title> </head> <body> <p>Hello, World!</p> </body> </html>
HTML requires all pages have a
<title> element, but the
<body> could be entirely blank. In this case it just displays a paragraph saying Hello, World!
Here is exactly the same webpage:
HTML ignores lines and spaces. Or rather, it compresses contiguous ones into a single space, which it ignores unless it’s part of displayable content. In the examples above, only the space displayed is the one between the words “Hello,” and “World!” The only difference between the two examples is that the first is easier for humans to read.
The take-away from this part is twofold: Firstly, HTML elements are enclosed in tags; we’ll only care about one of them, the
<P> element. Secondly, line ends and spaces are compressed into a single space, and that space only matters if it’s part of displayable content (otherwise it’s just ignored).
It’s the latter one that’s causing problems. Applying the former is the fix.
In the Classic Editor, as well as in comment boxes, we create a paragraph by typing sentences without pressing the [Enter] key. There is a wrinkle involving the ancient typewriter custom of putting two spaces between a period and the next sentence. If you do that, knowing HTML would compress the two spaces into one, WordPress replaces the second one with a NO-BREAK SPACE, a special Unicode character. This preserves the double-space.
Press [Enter] to end the paragraph and again to create a blank line before typing more sentences for the next paragraph. Most of us do this every time we type a comment (assuming it’s a multiple paragraph comment).
Note that in HTML those two [Enter] codes are compressed to a single space. It takes special handling on the editor’s part (or the comment box’s part) to recognize the [Enter] codes and create a paragraph from the text. This is apparently failing in the Classic Editor. (There are some indications it fails sometimes in comments, too.)
So the Reader will (at least sometimes) merge paragraphs into one block of text. The only breaks occur when the system is forced to end a paragraph.
[Which is a diversion on its own. In HTML everything is either a block element or an inline element. Roughly speaking, the former always cause a line break before and after, whereas the latter just flow one after the other as the page width allows. Encountering a block element among your merged paragraphs does cause a paragraph break.]
Note that on your actual WordPress web site, the page looks fine. The paragraphs are all intact. The problem is in the Reader. (Which does mangle your HTML somewhat. It strips out all style information, for instance.)
Insuring the Reader respects your paragraphs requires using the HTML editor (the text tab). The short version is that you have to surround your paragraphs with HTML
</p> tags. That makes your paragraphs explicit.
Unfortunately it’s not that simple. When you switch back to visual, the editor strips out plain
<p> tags. It restores the text to the original blank-line separated paragraphs. It wants plain blocks of text and blank lines for paragraphs. Of course it does; that’s its design. (Which suggests the Reader ought to fully understand blocks of text separated by blank lines. It’s required in comments, too, remember.)
One solution is to add a style attribute:
<p style="color:black;"> Now you’re adding something, so WP doesn’t strip out the tag. The problem is that it requires something to put in the style attribute. You can’t trick WP with an empty string.
One possibility is setting the text color. I’ve been doing this since 2011 because this theme (and far too many others) use a very low contrast text that I find hard to read. I don’t even understand why a designer would use such a low contrast text for reading. Another triumph of style over sense, I think.
As a final step before publishing, I highlight all my text and set the color to black. That wraps all my paragraphs in
<span style="color:#000000;"> and
</span> tags (which, like text itself, is an inline element that doesn’t affect paragraphing).
Years after I started blogging I upgraded to Premium, which allows setting the text color globally with CSS. I never got around to it, though. With the advent of the Reader bug, my old text-coloring process has been part of this workaround. Unfortunately, it requires having a text editor capable of running a macro. Or at least of search-and-replace.
Because what I do is switch to text mode, select all the HTML, copy it, paste it into my text editor (gvim), and run a macro that replaces
I realize this is a lot for the average user. I’ve been mucking with HTML since the mid 1990s, so it’s old hat to me. If you’re comfortable with HTML (which may be part of why you’re still using the Classic Editor), then this might be a work around you can use.
The problem does seem only to apply to posts created using the Classic Editor and viewed in the WP Reader. Switch to the Block Editor, or decide you don’t care how your posts look in the WP Reader; either should remove the issue.
Failing that, if you see it, you could complain to WordPress. I have, but I’m not sure they care. They don’t want to support the CE anyway. Yet maybe if enough people complain they’ll realize a lot of people care.
Alternately, try the following fix. This will work even after you publish a post and see it turned into a single paragraph in the Reader. Just go back and re-edit the post.
- Go into the HTML (text) editor tab.
- Start each paragraph with
- End each paragraph with
- Go back to the visual tab; check your post.
- Publish (or Update).
- Check post in the Reader.
Note that your paragraph text should start immediately after the start tag, and the end tag should come immediately after the last period. No spaces in either case. If you don’t want your text to be black, you could try another color or find some harmless other style setting.
An approach that’s possibly easier is what I described above: in visual mode, highlight all your text and set the text color to black using the color-picker on the toolbar. That surrounds your paragraphs with
</span> tags, so now all you have to do in text mode is change all the occurrences of span to p. Any decent text editor can do this.
This has gotten long enough that I’ll end here. I intended to get more into other the foibles of the WP Reader. I’m especially unhappy, and offended, about that graying out of old posts. It makes me angry.
But more on that another time. I will mention one thing related to this vanishing of paragraphs problem. If you read a post in the Followed Sites part of the Reader and use the comment box at the bottom to comment, WP does two weird things: Firstly, there will be two comment boxes for a moment. Secondly, the comment will be one paragraph no matter how many you created. But if you back out of the page, refresh, and return, your paragraphs appear in the comment.
So obviously, some part of the Reader’s function screws that up each and every time, but some secondary process fixes it. That secondary process apparently gets missed on Classic Editor posts in the Reader.
I deliberately left the above section unfixed to see how the Reader handles it. Compare how it looks in the Reader versus my website. I did the same thing accidentally in the previous post, and that part got collapsed.
I am, as always, happy to discuss this with those interested in knowing more in the comments. If you need more info about fixing your posts, I’ll try to help.
Stay classic, my friends! Go forth and spread beauty and light.