0

i am using a custom block theme, and i have support for alignwide and full. now i test my theme on 6.2 and the buttons for wide and full are not showing.

in my functions.php file i have this:

add_theme_support( 'align-wide' );

and in my theme.json file i have:

"layout": {
    "contentSize": "860px",
    "wideSize": "1100px"
},

the layout section is inside the settings section, so it is in the right position. so now in the front if i add manually the classes: alignfull or alignwide, it does work. but in the editor (posts, pages and site) i have a group, cover and other blocks, in the align options there are no alignfull or alignwide.

i should add i do have a .alignwide and .alignfull classes. and that on 6.1 i do have the toolbar buttons. it only disappeared in 6.2

any idea what is wrong and how to fix it?

3
  • which blocks are you testing this with? Align wide and align full were not removed and are pivotal parts of how layout works in block themes. I've confirmed this and you can confirm it too by visiting wordpress.org/gutenberg and seeing it firsthand. Note that it's also possible you've put your layout section in the wrong place in theme.json but it's not possible to tell because you only included a tiny snippet of your theme.json file
    – Tom J Nowell
    Apr 2, 2023 at 14:19
  • thank you for the answer. it is in the settings section so it is good. also if i remove it, it all becomes full width. so it does work. but i have no idea why my UI for the alignwide and full isn't there anymore. i also have .alignwide and .alignfull classes.
    – Ron
    Apr 3, 2023 at 5:06
  • not an answer, just a comment, note the other parts of my comment and edit your question accordingly to avoid any ambiguity and make the question easier to answer. Keep in mind your question needs to contain everything needed to answer the question, and you need to be able to mark an answer as not just what helped you, but as the factually correct answer for all people with this question. I don't think an open ended investigation fits into that category, or that you've provided enough information to do that
    – Tom J Nowell
    Apr 3, 2023 at 11:18

1 Answer 1

1

ok i found the issue at least for me, so maybe it will help others: on my templates , on the post-content comment i added: {"layout":{"type":"constrained"}}

that fixed the align issues.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.