Skip to content

Remove coupling of template parts when switching themes #72452

@annezazu

Description

@annezazu

Pulling from #25071 and after #67125 landed to ensure templates can persist after a theme change, I wanted to open a new issue to track that we need the same behavior for template parts (and maybe patterns?). Of note, there is early thinking around unifying template parts and patterns technically as well which is worth keeping track of in this work. This is coming back as a problem to solve as it relates to the ability to customize the navigation block's overlay by using template parts.

Why this is a problem for users

Without the persistence across themes, it means that someone could create an overlay for their mobile menu, switch themes, and lost that work entirely. This happens even outside of having a mobile overlay customized though so it still remains important to fix. Here's a current look where I created a custom header template part, switched themes, and lost the header:

Screen.Recording.2025-10-17.at.11.40.44.AM.mov

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Block] Template PartAffects the Template Parts Block[Feature] ThemesQuestions or issues with incorporating or styling blocks in a theme.[Type] EnhancementA suggestion for improvement.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions