Header & Footer Template Parts Auto Added to new Templates #44441
Labels
[Feature] Site Editor
Related to the overarching Site Editor (formerly "full site editing")
[Type] Enhancement
A suggestion for improvement.
What problem does this address?
Currently in the site editor, if you add a new Template, you are met with a blank template.
Soon in WordPress 6.1 and as of Gutenberg 13.9 you’re now given content from the closest related template in the hierarchy as announced in the news article (https://make.wordpress.org/core/2022/08/25/core-editor-improvement-refining-the-template-creation-experience/)
Just playing around now on the current WP version I was met with a blank template which was frustrating, then I installed the GB plugin to see if there was an update coming down the line to rectify this.
At first, I was happily surprised and excited to see I got a header and footer in new templates, only to figure out and discover here that this is only because it is adding the closest existing template in The hierarchy. If the closest template hadn’t been built out yet, I would have to add the header and footer in multiple places manually.
This makes no sense given that that header.html and footer.html should exist on every page anyway. (I can’t think of a scenario they wouldn’t be included)
I believe the header and footer template parts should be added automatically with every new Template created in the site editor. This can be in addition to the content being included in the merge noted below.
The GitHub issue which has been merged (#42520)
Workflow with classic themes would mean that index.php, 404.php, front-page.php etc. were already included or created in the theme with and included before anything else.
I can imagine a workflow of coming straight to the site editor as a developer, creating the templates I need first, and then creating the page layouts after. With the merged solution, that means that all templates will be blank including no header or footer which doesn't make much sense.
I appreciate that if templates are already created and built out, they should be prioritised, but if no closest template in the hierarchy exists yet or is blank, then as a minimum, the header and footer (if they exist) should be added to the new template.
What is your proposed solution?
I can imagine a workflow of coming straight to the site editor as a developer, creating the templates I need first, and then creating the page layouts after. With the merged solution, that means that all templates will be blank including no header or footer which doesn't make much sense.
I appreciate that if templates are already created and built out, they should be prioritised, but if no closest template in the hierarchy exists yet or is blank, then as a minimum, the header and footer (if they exist) should be added to the new template.
This reduces the risk of less technical users, excluding the header &/or footer not knowing that it should be added. It also speeds up the workflow for everyone if they don't have a built-out template already to be copied over.
I can't see any disadvantages to this being added as a minimum viable experience to new templates in the site editor.
I am also not proposing we scrap the merged solution as this is clearly favourable in cases where the closest template has already been built out.
The text was updated successfully, but these errors were encountered: