@izzaboo Would you please share detail steps of how you fix it ?
I also encounter this problem and don’t know how to fix it.
Thanks.
This solution worked for me:
add this line to you functions.php file:
add_theme_support( 'align-wide' );
edit: After further testing, creating a new theme, simply adding the layout contentSize and wideSize settings seems to have added the alignment options. However, in my original theme I had already had those, so I am unsure as to why it was previously not appearing.
I’m teaching myself how to build FSE themes currently and was having a similar issue with images only being able to be left, right, or center aligned. None of the solutions here added the additional wide and full width options. I found the solution in the TwentyTwentyFive theme.
With the layout contentSize and wideSize set in theme.json, you need this line under settings:
“useRootPaddingAwareAlignments”: true
For example:
{
"version": 3,
"settings": {
"layout": {
"contentSize": "645px",
"wideSize": "1340px"
},
"useRootPaddingAwareAlignments": true
}
}
As soon as I added that line, the options appeared and styled correctly in the editor and on the frontend. However, when I remove the line to test if that was in fact the solution, the options are still present so YMMV.
-
This reply was modified 1 year, 1 month ago by
strucep. Reason: Additional information to the exact issue I was experiencing and additional testing
-
This reply was modified 1 year, 1 month ago by
strucep. Reason: More info on testing and results