• Resolved meg28

    (@meg28)


    Hi! I have 2 very similar sites when speaking of layout. They are both on WordPress 6.0., but on different versions of Astra theme. The one with newest theme version (https://staging.romecolosseumtickets.tours/) now after theme update has additional classes on almost every div (wp-container-x, where x is random number). These classes have some css that overrides css how it was before. Then I needed to check all my pages where something broke and fix it with new custom classes to override those classes wp-container-x. I contacted first Astra theme support, but they told me that problem is in WordPress since those classes stood there after changing theme to default one. Since sites are created with Gutenberg I guess the problem is with Gutenberg? I don’t understand how come this site https://stonehengetickets.tours/ doesn’t have this classes. Is there a way I can somehow remove wp-container-x classes from https://staging.romecolosseumtickets.tours/?

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator Kathryn Presner

    (@zoonini)

    Hi @meg28,

    Classes like wp-container-N are normal to see when using the block editor.

    If you want to remove them, you might want to check out the function workaround explained here by @poena:

    https://stackoverflow.com/a/71274320

    I don’t understand how come this site https://stonehengetickets.tours/ doesn’t have this classes.

    Hmm, I am seeing those block classes on this site. Here are a couple of examples:

    Stonehenge Tours Stonehenge Tickets Info Contact

    Thread Starter meg28

    (@meg28)

    Hi! Those classes weren’t there on Stonehenge…since almost 2 weeks passed of course something has changed, now everywhere are those classes, I assure you they weren’t there before and they broke some visuals with it’s css, but nevermind, I fixed it by myself with additional classes and more css.

    Moderator Kathryn Presner

    (@zoonini)

    Glad you got things resolved for now.

    In the future, a couple of troubleshooting steps to take to narrow down discrepancies would be to check whether both the live and staging sites are:

    – using the same version of WordPress
    – using the same version of the Gutenberg plugin
    – experiencing the same issue with the Gutenberg plugin; keep in mind that this plugin is only needed to get pre-release block-editor features that aren’t yet in core.

    And as I mentioned before, if you want to completely remove those container class names, you could give the workaround in the StackOverflow thread a try, on your staging site first.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Problem with additional classes’ is closed to new replies.