-
Johnny1885
Hi,
since an update… my Buttons in Editor are different than in webseite.Webseite is korrekt.
In Editor it is always centeredI use this Button-Style in as Day Intenary in Tourpgrograms
Since an update its wrong
-
Alvind
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.
-
Johnny1885
still same problem
-
Johnny1885
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?
-
Alvind
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.
-
Johnny1885
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/
-
Johnny1885
This helped. Thank you very much Ying!
-
You are welcome 🙂
- You must be logged in to reply to this topic.