Support » Fixing WordPress » Empty spaces after WordPress 5.7 update

  • Resolved giusgenc



    after updating to WordPress 5.7, empty spaces have been created between paragraphs.
    Comparing the old CSS with the one after the update I noticed that before where it was: <p></p> now is added <p>:: before</p>.This causes an empty space of 15px or 20px.

    Inspecting the code after the update, it adds:

    p: empty: before {
    content: “”;

    Disabling this code from the Chrome console fixes the problem. How to intervene to resolve it definitively?


    • This topic was modified 1 year, 3 months ago by giusgenc.
Viewing 7 replies - 31 through 37 (of 37 total)
  • Moderator Samuel Wood (Otto)

    (@otto42) Admin

    Yeah, I can. You do have extra empty P tags right in your code.

    <h2>MagVigen™ Plasma DNA Capture Kit Cat# K61003</h2>
    <p><a name="order"></a></p>
    <div style="overflow-x:auto;">

    That p with the a and then closing them both, that is empty.

    You need to remove those empty P’s from your post content. They should not be there.

    That bit of css worked. I’m using the classic editor and the extra space was only appearing after the first paragraph in a post. Really annoying.

    Having the same issue after the upgrade. Used the CSS code provided but it doesn’t solve the issue for the shortcodes that the block editor has included. All my paragraphs now have two extra p tags in between them:

    <p><!– /wp:paragraph –></p>

    <p><!– /wp:paragraph –></p>
    <p>It might be an oversimplification, but insurance company growth lately is more about filling in gaps and blanks — capturing new or open opportunities with new products, partners and channels . Because risk management is the core of insurance, most insurers are very adept at managing risk to ensure underwriting profitability and customer satisfaction.  Digital technologies and greater real-time data access are both steadily advancing risk management expertise, while also helping customers reduce or mitigate risk.</p>

    I have thousands of posts that are affected, is there a similar code I can use to hide all those shortcode paragraphs that were created?



    Did you try with “important” ?
    Some people had to use it.

    p:empty::before {
        content: none !important;


    Just tried is with !important, but it still didn’t work.

    Thanks for the suggestion.

    The problem with this ridiculous change is that it totally screwed up 100s of posts in my blog that were created with block editor. If you copy text from Microsoft Word to your blog, you are going to get tons of these <p>s. Obviously, geniuses in WordPress team didn’t think about this most common use case of publishing content in your WordPress blog 🙁

    Releasing 5.7.1 just to fix this “ridiculous change” might be the right thing to do …

Viewing 7 replies - 31 through 37 (of 37 total)
  • The topic ‘Empty spaces after WordPress 5.7 update’ is closed to new replies.