-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Patterns in Classic Themes: full-width alignment doesn't display in the editor for patterns created in Block Themes #62516
Comments
I'm noticing that the classic themes have a layout type of (Quick primer: In block themes it seems that only constrained layouts support alignment, and default layouts don't support them. In classic themes I'm not sure how it's supposed to work, but it looks like they only have a I tested in WordPress 6.4 and it was also an issue back then, so it seems like it has always been a bug, and not something specific to 6.6. I guess the fix only worked for block themes. It'd probably be quite easy to fix if I knew how to detect that the |
Ok so, it appears this is coming from the Appearance Tools settings. Classic themes do not have this option active by default. In this sense, this is expected. |
I made some progress. This is almost easily solvable, but not quite. It's possible to add the correct alignment classes to the pattern block, but there's an extra step. In classic themes, blocks have an extra <div class="wp-block" data-align="full">
<div class="block-editor-block-list__block wp-block-group" id="block-57d4791e-0755-4274-8148-201f0f3c669b" role="document" aria-label="Block: Group" data-block="57d4791e-0755-4274-8148-201f0f3c669b" data-type="core/group" data-title="Group" data-is-drop-zone="true"><div class="wp-block-group__inner-container block-editor-block-list__layout is-layout-constrained wp-block-group-is-layout-constrained">
</div>
</div> This part isn't easy to achieve. I'll have a think about it, but if it's a big task it might sadly not be worth the effort. |
Removing this from the 6.6 board given the conversation above about how it's not a new issue. |
This issue is not isolated to patterns created in block themes, it's any pattern created with a classic theme that has theme.json. If you select some blocks with alignment and create a synced pattern, the existing alignment is kept and displays in the front end, but there is no longer a way to edit it. Needless to say, this is very confusing. It may make sense to consolidate discussion in #62326, as the title there is more accurate. |
Is there any additional movement on this? It is difficult to use synced patterns when using classic themes with theme.json when there is no ability to use the alignment options after the pattern is created. |
Description
Possibly related to #62326
When a pattern created in a Block Theme with a full-width block is inserted in a page or post after switching to a Classic Theme, the full-width block in the pattern will display in content width in the editor. It maintains the correct alignment on the front end, though.
Step-by-step reproduction instructions
Screenshots, screen recording, code snippet
Environment info
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
The text was updated successfully, but these errors were encountered: