• Some of the plugins on my site use shortcodes. Also, I use the Classic Editor plugin to use the classic editor, not Gutenberg.

    When I create pages in the classic editor, I include shortcodes in the text to use the appropriate plugin.

    In WordPress 5.6.2, my site worked great. After upgrading to WordPress 5.7, there are now large spaces (about 70px in size) added to the website wherever there’s a shortcode in the classic editor text. If I remove the shortcodes, the spaces disappear.

    Any suggestions? Thank you

Viewing 9 replies - 16 through 24 (of 24 total)
  • If the issue is that WP core has this css:

    p: empty: before {
    content: “”;
    }

    Then I would try to override this in css with:
    p: empty: before {
    content: initial !important;
    }


    If the issue is that <p>-tags are added I would recommend this hosting blog:
    https://templ.io/blog/prevent-wordpress-from-adding-p-tags-in-content/

    Thanks @wibergsweb! It fixed my issue with the following:

    p:empty::before {
        content: initial !important;
    }

    WordPress 5.7 started adding large gaps around shortcodes and also in other places with the empty p tags, which the above code from @wibergsweb fixed (before will have a :: instead of a single : on it). I am using the Classic editor.

    I recommended that this change should be reverted, and it looks like it will be.
    https://github.com/WordPress/gutenberg/pull/29809
    But the revert won’t be until the 5.7.1 release, which isn’t scheduled yet.

    @rawhasan – Glad to help for now ?? Now we just have to wait 5.7.1 until it’s no problem no more ??

    Thanks a lot @wibergsweb!
    Adding the following in my site theme css works great

    p:empty:before{content:initial !important;}

    • This reply was modified 3 years, 8 months ago by techchee.
    • This reply was modified 3 years, 8 months ago by techchee.

    I’m having the same issue on several websites I built using the Avada theme. One example is https://www.hollywoodbowling.com.au/lawn-bowling/ – it adds the empty <p> tags and space after for some of the headlines (such as after Club Memberships and FAQs but not after some others such as after Lawn Bowling). There are 100% no empty tags added by myself. I’ve also seen this happen on https://secolodining.com.au after the upgrade to WordPress 5.7 – they’re using the Osteria theme.

    This is still unresolved in the new update. You have to keep that CSS code as a fix still. Using classic editor as well. Update to downdate.

    • This reply was modified 3 years, 7 months ago by biga.
    • This reply was modified 3 years, 7 months ago by biga.

    STILL NO FIX. GREAT wordpress IS DOWNGRADING. I guess the wordpress world is ran by a bunch of monkeys. Will someone get off their fat ass and fix this shit?

    • This reply was modified 3 years, 6 months ago by biga.
    • This reply was modified 3 years, 6 months ago by biga.

    Hi, is there an update on this?
    Cheers

Viewing 9 replies - 16 through 24 (of 24 total)
  • The topic ‘Issue with space added near shortcodes in WordPress 5.7’ is closed to new replies.