-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Twenty Twenty-One: Add block template support, including a default template #1455
base: master
Are you sure you want to change the base?
Twenty Twenty-One: Add block template support, including a default template #1455
Conversation
src/wp-content/themes/twentytwentyone/assets/sass/05-blocks/columns/_style.scss
Outdated
Show resolved
Hide resolved
…o-twenty-twenty-one
<!-- /wp:group --> | ||
|
||
<!-- wp:group {"align":"full","tagName":"main"} --> | ||
<div class="wp-block-group alignfull entry-header"><!-- wp:group {"align":"wide","layout":{"inherit":true}} --> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the entry-header class should go on the header tag right above. This is adding a weird padding and border at the bottom of the page
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great catch, thank you! I've taken a different approach to this in 3bbcd26, and it should be working better now. 👍
as well as bottom spacing for the default template.
This PR adds block template support to Twenty Twenty-One, and also provides a default block template, as per the instructions here:
https://make.wordpress.org/core/2021/06/16/introducing-the-template-editor-in-wordpress-5-8/
The default template includes a simplified approximation of the default page layout, minus things like navigation and a footer (which requires translatable text — something not yet possible in block templates). This was pulled from TT1 Blocks, but simplified down a little bit.
Note: The theme stylesheet is not loaded in the template editor. A warning is thrown about this, but I'm not sure what to make of it since Twenty Twenty-One does enqueue the stylesheet properly via
add_editor_style()
.GIF:
Trac ticket: https://core.trac.wordpress.org/ticket/53564
This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.