Skip to content

Clear customizations after template export & adding to theme files #40432

Closed

Description

@Humanify-nl

What problem does this address?

My workflow with the site-editor currently is:

  • 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:
image

Activity

  1. added
    [Type] Enhancement
    [Feature] Themes
    Developer Experience
    on Apr 20, 2022
  2. annezazu commented on Apr 20, 2022

    @annezazu
    Contributor

    cc @scruffian as this seems in line with some work you've been doing around exports.

  3. scruffian commented on Apr 22, 2022

    @scruffian
    Contributor

    Yes! Our suggested workflow is to allow you save the edits directly to the files as per: #39194

  4. pbking commented on Apr 28, 2022

    @pbking
    Contributor

    @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.

  5. added
    [Feature] Site Editor
    and removed on Jul 24, 2023
  6. youknowriad commented on Oct 6, 2026

    @youknowriad
    Contributor

    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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Developer Experience[Feature] Site Editor[Feature] Themes[Type] Enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions