Repository navigation
Feedback: Improved export functionality needed for the new Template API #72515
Description
What problem does this address?
Related to #71735
The new Template API looks very solid and introduces an important and much-needed distinction between default theme templates and custom templates. This represents a clear step forward in how templates are managed and extended within block themes.
However, from a developer’s perspective, there’s currently a major gap when it comes to exporting themes that include custom templates.
Context
With current block theme functionality in WordPress core, it’s possible to export a theme, including certain custom template edits, and then merge those changes back into a development environment for version control. This workflow makes it possible for developers to iterate within the Site Editor, refine templates visually, and then bring those improvements back into the codebase.
With the new Template API, however, that workflow appears to be lost. The new architecture doesn’t currently provide a mechanism to export custom templates or other user-generated changes made within the Site Editor. As a result, developers can no longer easily version or maintain this work alongside their theme’s source files.
Problem
Without a way to export custom templates created through the Template API, any work done within the Site Editor becomes effectively siloed. This makes the “Export Theme” functionality redundant for developers who wish to integrate that work into their theme’s default templates or track changes through Git.
In practice, this limits an otherwise excellent feature, as it breaks the feedback loop between design iteration in the Site Editor and source-controlled theme development.
What is your proposed solution?
When exporting a theme, include any custom template or custom part files in a separate directory, perhaps something like /custom-templates/ or /exports/.
This would:
- Allow developers to review and decide which changes to merge into their core theme.
- Preserve the existing flexibility of the block theme export feature.
- Maintain a clean distinction between default and custom templates introduced by the new Template API.
Summary
The new Template API is a strong step forward for how WordPress handles templates, but the lack of export functionality for custom work significantly limits its usefulness in a development workflow. Providing a structured export of custom templates would restore that vital bridge between in-editor design iteration and theme development under version control.
Activity
[-]Feedback: Improved export functionality needed for the new Template API #71735[/-][+]Feedback: Improved export functionality needed for the new Template API[/+]