Skip to content

User Created Template Parts to be shown along with the theme's template parts and in Pattern Library #69493

@PradViking

Description

@PradViking

What problem does this address?

Currently if a user creates a template part, it is not available to be chosen in the theme's available template part lists nor in the pattern section while the user is editing/building the page/post. However, if the user explicitly searches for the template part, it appears.
Also, adding the user created template part does not automatically replace the existing template part, instead is added along with the template's existing part.
The current implementation is quite confusing and adds unnecessary extra steps to find the template part and add it to a template and then delete the existing template part instead of simply replacing like the behaviour of the theme's default template parts.

Example - Let's say user wants to change the header for a template. User can choose from the many header template parts available in the list created by the theme author. And selecting any of the designs, replaces the current header automatically. User created template parts do not appear in the list nor do they automatically replace the existing header. Searching for and adding the user created Header adds it along with the the existing header instead of replacing it.

User created template part

Image

Template Part not available in template part section

Image

Template part not visible in the Patterns library

Image

Template part appears if user explicitly searches for it

Image

What is your proposed solution?

When a user creates a Template part, automatically add them to the theme's available template parts and the pattern library. So when the user wants to change the template part, it should just be a single click on the user created template part and if user browses through the pattern library, it should be visible under the appropriate section.

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Status] Needs More InfoFollow-up required in order to be actionable.[Status] StaleGives the original author opportunity to update before closing. Can be reopened as needed.[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