Are you a GenerateCustomer?

Do you have an active GP Premium or GenerateBlocks Pro license key?

Create a GenerateSupport account for GeneratePress and GenerateBlocks support in one dedicated place.

Create an account
Already have a GenerateSupport account? Login

Just browsing?

Feel free to browse the forums. Support for our free versions is provided on WordPress.org (GeneratePress, GenerateBlocks).

Want to become a premium user? Learn more below.

Button in Editor different as webseite

  • Hi,
    since an update… my Buttons in Editor are different than in webseite.

    Webseite is korrekt.
    In Editor it is always centered

    I use this Button-Style in as Day Intenary in Tourpgrograms

    Since an update its wrong

  • Hi there,

    Can you try deactivating all plugins except GP Premium and GenerateBlocks to see if another plugin is causing the issue? Sometimes a plugin can enqueue CSS in the block editor, which may lead to layout inconsistencies.

    If the issue persists after deactivating other plugins, feel free to provide a temporary admin login so we can take a closer look.

  • still same problem

  • i “guess” this css from gb cause problem:

    .gb-button-wrapper>.block-editor-inner-blocks>.block-editor-block-list__layout {
    align-items: flex-start;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    margin-right: 0;
    }

    – display: flex;

    Or?

  • That seems to be the issue. You can move the button block outside of its container to ensure the layout in the editor matches the frontend output.

    I’ve already applied this adjustment to the “Tag 1” button, you can check it now. It should appear in the correct position as displayed on the frontend. Let me know if you’d like me to revert the changes.

  • Just to clarify – the issue only exists in the editor, not on the actual website. Frontend output is fine.

    I’m using this button layout in over 5,000 places as part of day itineraries in tour programs on different sites and hundrets of tour itenaries. Since a recent update, all buttons are now shown centered in the editor, even though they’re left-aligned on the site.

    This wasn’t the case before, and now the editor view is really misleading. It’s not practical to go back and manually adjust thousands of buttons just because of how the editor styles changed.

    Would it be possible to roll this back or at least offer a way to disable it? Would really appreciate a fix.

  • Try this PHP code:

    wp_add_inline_style( 'wp-block-library', 
    '.block-editor span.block-editor-block-list__block.wp-block.gb-button.wp-block-generateblocks-button {
        margin-left: 0;
    }' 
    );

    Adding PHP: https://docs.generatepress.com/article/adding-php/

  • This helped. Thank you very much Ying!

  • You are welcome   🙂

Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.