This PR will change the way templates work in the theme.
Reasons for change:
Remove the content.html template part
Instead this PR uses the core/content block with a constrained layout directly in templates. This change allows blocks in the content area to get proper alignments. This change was needed because of the way WordPress writes alignment classes. The align* class needs to be a direct child of .is-layout-constrained: body .is-layout-constrained > .alignwide
Also wrap-core-blocks.php in hooks has been removed. Wrapping paragraph blocks ruined the alignments because of the rules WordPress was adding that affected blocks that do not have alignments: body .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull))
Use patterns for the header and footer, reference the patterns in the template parts
This allows editors to use the header and footer like regular blocks
Add no-title page template
This template displays a page with no title. This is useful for scenarios where there is a hero or similar block at the top of the page, in which case a title should not be displayed.
Add blank page template
This template only displays post content with no header or footer. This is useful for landing pages or other pages where the header and footer should not display.
To Test:
Play around with the page templates and block alignments and make sure things are being aligned correctly in admin as well as on the frontend.
Fixes https://webdevstudios.atlassian.net/browse/WDSUS-34
This PR will change the way templates work in the theme.
Reasons for change:
Remove the
content.html
template partcore/content
block with a constrained layout directly in templates. This change allows blocks in the content area to get proper alignments. This change was needed because of the way WordPress writes alignment classes. Thealign*
class needs to be a direct child of.is-layout-constrained
:body .is-layout-constrained > .alignwide
wrap-core-blocks.php
in hooks has been removed. Wrapping paragraph blocks ruined the alignments because of the rules WordPress was adding that affected blocks that do not have alignments:body .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull))
Use patterns for the header and footer, reference the patterns in the template parts
Add no-title page template
Add blank page template
To Test:
Relates to #16