-
Notifications
You must be signed in to change notification settings - Fork 92
Improve the default template provided to the post/page template editor #177
Comments
This seems like something that should just happen automatically for block themes. If you choose "New", then Gutenberg should provide you with a copy of your current template to edit. I did try just mapping this to one of our existing templates using the function provided here:
... but it didn't render any of the theme's template parts. 😞 If a theme did want to provide an alternate default template, it seems like that should happen in theme.json, rather than in |
Opened two Gutenberg issues for that: WordPress/gutenberg#36086 If someone can help me figure out whether the template part loading issue is something we can fix here or not, that would be great. I'm unclear if that should be an upstream issue. |
I think this should be filed upstream as a bug — the template parts are accessible when you enter template editing mode, so they should also be via the default template. I tried various hooks / loading orders to see if it was an issue that could be solved by loading priority, and could not get the template parts to load in any combination. |
Thanks — I've opened a new Gutenberg issue for this: WordPress/gutenberg#36124 |
And can this be solved by adding the actual markup instead of including the existing file? |
Can I ask for a decision about how long to wait for an upstream solution before I add a pull request to the theme? |
I don't think it can. It's important to allow the header and footer pull from the actual template parts, so that they stay in sync. I think it would be unexpected and confusing to have these look the same as the original templates, but not to stay in sync with template part changes. A resolution to WordPress/gutenberg#36124 would fix that, and I think that's all we need to get this working in the theme (I do consider that issue to be a bug, so I think a fix for 5.9 is reasonable if it's technically doable). There's a potential workaround there that I'd love folks' input on. If that's not viable we can try and get a more thorough fix prioritized. |
I'm moving this to a post-launch milestone since WordPress/gutenberg#36124 is no longer going to be part of 5.9. We'll migrate this issue over to Trac around the time that 5.9 launches and continue tracking there. |
This has been migrated over to Trac here: https://core.trac.wordpress.org/ticket/54930 |
Is your feature request related to a problem? Please describe.
When you create a new template (for example from the block editor Template Section),
the Gutenberg default template is used which uses 3 groups, a site title, tagline, separator, post title and content.
Describe the solution you'd like
A nicer looking default template could be added.
The text was updated successfully, but these errors were encountered: