Line breaks not preserved on first post in block editor
-
I have been using the Display Posts plugin for years and recently found a quirk that I cannot explain. I’m not sure anyone else has reported it and if there is a fix. On my home page I use the following shortcode:
[display-posts posts_per_page="20" category="announcements" image_size="thumbnail" wrapper="div" include_content="true" include_link="false"]
This was working fine for me in Classic Editor, but I recently converted my home page to Block Editor. Now the first post on the page does not preserve line breaks and it just all runs together in one line unless I manually add <br> or <p> tags to indicate where the line breaks should be. (This is not a problem for me to do, but it is hard to explain to non-technical staff who are expected to edit their own websites.)
-When I use that same shortcode on a different page in Classic Editor it works just fine.
-It is always a problem with the top post on the home page, no matter what that post is. The 2nd, 3rd, 4th posts are always fine, even if I add a new post to the top, the the 1st post moves to the 2nd position and is fine.
-I tried using a “Classic Block” instead of a “Shortcode Block” but I still have the problem.
-I tried previewing my page in a different theme (Twenty Twenty) and I still have the problem.
-I made sure I am using straight quotes in my shortcode, not curly quotes.I am not really sure at this point if it is a core WordPress Block Editor issue or with the Display Posts plugin. I am running WordPress 5.4.2 and Display Posts 3.0.2.
The page I need help with: [log in to see the link]
- The topic ‘Line breaks not preserved on first post in block editor’ is closed to new replies.