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

Define the default template for template creation in theme.json #42603

Open
carolinan opened this issue Jul 21, 2022 · 3 comments
Open

Define the default template for template creation in theme.json #42603

carolinan opened this issue Jul 21, 2022 · 3 comments
Labels
[Feature] Template Editing Mode Related to the template editor available in the Block Editor [Feature] Themes Questions or issues with incorporating or styling blocks in a theme. [Type] Enhancement A suggestion for improvement.

Comments

@carolinan
Copy link
Contributor

What problem does this address?

When users create a new custom page template from the block editor's Template section, WordPress uses a basic template with a few selected blocks.

What is your proposed solution?

I know there is a lot of ongoing work to improve the template creation flow ❤️. It would be an additional improvement for theme developers if they could define a template html file to be used as the default.

This could be part of the customTemplates section in theme.json:


	"customTemplates": [
		{
			"name": "page-without-title",
			"title": "Page without title",
			"default": true
		}
	],

@carolinan carolinan added [Feature] Template Editing Mode Related to the template editor available in the Block Editor [Feature] Themes Questions or issues with incorporating or styling blocks in a theme. [Type] Enhancement A suggestion for improvement. labels Jul 21, 2022
@Mamaduka
Copy link
Member

Probably a duplicate of #36086, but in this case, I think we can close the old issue.

P.S. I like the idea of using the default flag in the definition.

@ellenbauer
Copy link

That would be so incredible helpful to have. It's not a great experience for users to have to switch the template from default every time. For our block themes, we would much rather have our Header & Footer only Template be the default one.

@carolinan
Copy link
Contributor Author

Yes, it is the same issue, I could not find #36086 when searching :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Template Editing Mode Related to the template editor available in the Block Editor [Feature] Themes Questions or issues with incorporating or styling blocks in a theme. [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

3 participants