Skip to content
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

Header & Footer Template Parts Auto Added to new Templates #44441

Closed
phil-sola opened this issue Sep 25, 2022 · 2 comments
Closed

Header & Footer Template Parts Auto Added to new Templates #44441

phil-sola opened this issue Sep 25, 2022 · 2 comments
Labels
[Feature] Site Editor Related to the overarching Site Editor (formerly "full site editing") [Type] Enhancement A suggestion for improvement.

Comments

@phil-sola
Copy link

phil-sola commented Sep 25, 2022

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.

@Mamaduka Mamaduka added [Feature] Site Editor Related to the overarching Site Editor (formerly "full site editing") [Type] Enhancement A suggestion for improvement. labels Sep 26, 2022
@annezazu
Copy link
Contributor

@phil-sola this feels very similar to this issue around presenting someone with initial configuration options: #41060 Can you add part of your feedback as a comment there and consider closing this out to better consolidate the feedback/ideas?

@annezazu
Copy link
Contributor

annezazu commented May 9, 2023

Going to close this out for now in order to consolidate around the issue mentioned above. Happy to re-open if you'd like to discuss further!

@annezazu annezazu closed this as completed May 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Site Editor Related to the overarching Site Editor (formerly "full site editing") [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

3 participants