Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create system for names and descriptions of FSE templates #25755

Open
noahtallen opened this issue Sep 30, 2020 · 4 comments
Open

Create system for names and descriptions of FSE templates #25755

noahtallen opened this issue Sep 30, 2020 · 4 comments
Assignees
Labels
[Feature] Site Editor Related to the overarching Site Editor (formerly "full site editing") [Type] Enhancement A suggestion for improvement.

Comments

@noahtallen
Copy link
Member

We should create a system which lets users easily understand and identify the different templates available in WordPress. For example, singular by itself is not informative unless you already know about the template hierarchy.

Though I'm not sure yet where this will appear in the FSE interface (or what the copy should be for describing things), we can at least create something like getTemplateInfo, which takes a template slug/identifier and returns helpful information about it.

cc @jameskoster

@jameskoster
Copy link
Contributor

I made a rough outline of some descriptions we might use in this Figma. These definitely need refinement, but could serve as a starting point?

Also worth noting, if we are able to determine which templates are actively in use at a site (as mentioned here), we may be able to dynamically generate more contextual template descriptions. Appreciate this may not be a 'v1' thing though :)

@mtias
Copy link
Member

mtias commented Oct 1, 2020

Also worth noting that user defined templates should also allow a description, which could be configured through the excerpt field in the wp_template entry.

@noahtallen
Copy link
Member Author

Note: this was partially accomplished in #25739, which added a basic map of template slugs to template info.

@aristath
Copy link
Member

aristath commented Oct 8, 2020

Just a note from me: These should be filterable. This way plugins like woocommerce and others can add their own templates & descriptions for their template-parts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Site Editor Related to the overarching Site Editor (formerly "full site editing") [Type] Enhancement A suggestion for improvement.
Projects
No open projects
6 participants