You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Clear customizations after template export & adding to theme files #40432
Change the templates according to project requirements
Export the templates from database and copy them in the theme (repo)
Press clear customizations for 10+ template & parts manually.
What is your proposed solution?
There needs to be some way for the editor to 'recognise' an import is done and that the theme files have been overwritten with the current (exactly similar) exported templates & parts that were imported in the theme files.
For now, what would help immensely is an option to 'clear all customizations', instead of having to press the buttons 20 times for each part.
Also this needs to clear automatically... because it is.. see for yourself:
@Humanify-nl Until this lands in core I've been using this plugin which has that very feature. It saves the templates and customizations in the active theme files and then clears those customizations from the user space.
Ultimately the most useful aspects of that plugin should make their way into Gutenberg and Core but this has helped my workflow quite a bit in the meantime.
You can now select several templates or template parts in the Site Editor lists and reset them in one go with the bulk "Reset" action (WordPress/gutenberg#57255). For the save-to-theme-then-clear workflow, the Create Block Theme plugin handles both steps, as mentioned above. Closing as addressed, thanks!
Activity
annezazu commentedon Apr 20, 2022
cc @scruffian as this seems in line with some work you've been doing around exports.
scruffian commentedon Apr 22, 2022
Yes! Our suggested workflow is to allow you save the edits directly to the files as per: #39194
pbking commentedon Apr 28, 2022
@Humanify-nl Until this lands in core I've been using this plugin which has that very feature. It saves the templates and customizations in the active theme files and then clears those customizations from the user space.
Ultimately the most useful aspects of that plugin should make their way into Gutenberg and Core but this has helped my workflow quite a bit in the meantime.
youknowriad commentedon Oct 6, 2026
You can now select several templates or template parts in the Site Editor lists and reset them in one go with the bulk "Reset" action (WordPress/gutenberg#57255). For the save-to-theme-then-clear workflow, the Create Block Theme plugin handles both steps, as mentioned above. Closing as addressed, thanks!