-
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
Block Group: Missing alignment options and styles when using a Classic theme #62326
Comments
I stumbled upon the same issue. It’s working for me as long as there is no Test theme: style.css: /*
Theme Name: TEST
Description: Test
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: test
Update URI: false
This theme, like WordPress, is licensed under the GPL.
Use it to make something cool, have fun, and share what you've learned with others.
*/ functions.php: <?php
function test_setup() {
// add Gutenberg wide and full content support
add_theme_support( 'align-wide' );
}
add_action( 'after_setup_theme', 'test_setup' ); As soon as you add a {
"$schema": "https://schemas.wp.org/trunk/theme.json",
"version": 2
} |
Ok so, I could be wrong but this seems to be expected https://developer.wordpress.org/themes/global-settings-and-styles/settings/appearance-tools/ Classic themes will not have support for this unless they state it explicitly. I do not have the full context but I imagine this was done to prevent unintended layout consequences. In this sense, I would not consider it a bug. |
I suggest closing this issue as "wont fix", but I would like to hear from you all first. |
It’s at least a regression since we use this system as is quite a while and I guess it was in WordPress 6.5 when the appearance tools got removed from the toolbar in such cases. Before that, it worked fine. And I would assume that using |
And, unfortunately, explicitly setting At least when it comes to the alignment setting in the block toolbar. |
I believe this is a weird inconsistency and makes using the pattern editor in classic themes simply a bad experience, as the admin view will not reflect how the pattern will behave on the frontend or even when inserted in a page in the backend. I think the expected behaviour should be the same as in the post editor. So if a block supports wide or full alignment the pattern editor should reflect that. |
Thank you for checking and re-testing @MatzeKitt & @arpadkdweb. I will admit I am a bit out of my depth here. @MaggieCabrera, could you help us get some more context here? |
I have the same problem, I want to use wordpress patterns. However, I don’t have the alignwide and alignfull options on blocks (including native blocks like the gallery). Our WordPress themes work with theme.json, so the add_theme_support( ‘align-wide’ ) function is not interpreted. Also, when testing with the Twenty Twenty-Four theme, the options are available. FSE themes don’t seem to have this problem. In fact, the custom post type ‘wp_block’ is considered like a DESIGN_POST_TYPES. Cf comment: https://github.com/WordPress/WordPress/blob/6.5.5/wp-includes/js/dist/editor.js#L15463 |
Considering we are going to enable patterns on Classic themes in 6.6, it would be good to get some clarity on this one Could you help us here, @jasmussen? Thank you! |
Is this issue similar to #62516? If yes, there's some discussion there that might be useful to dive into. Otherwise I would recommend a broader ping, along the lines of gutenberg-core. |
I think this is the same issue described here, though the name is deceptive - it applies to any pattern created in a classic theme with theme.json.
The documentation on that page lists the following as affected by setting Reiterating, it is very confusing that if you select a block with an alignment and create a synced pattern with it then the alignment is preserved and displayed on the front end, but there is no longer a way to edit it. |
Description
Pattern editor in classic theme does not allow wide and full alignment options whether it's a synced or unsynced pattern. I expect the same block supports settings to be available in the pattern editor as in the post editor.
Also, it makes sense to create patterns or even complex full page pattern templates that go full width.
The pattern in my classic theme is constrained to container width.
Step-by-step reproduction instructions
Screenshots, screen recording, code snippet
Pattern editor
Post editor
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: