-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Grouping custom templates in the templates list #48651
Description
Custom templates are somewhat unique as they can be applied manually to multiple post types, rather than automatically according to the template hierarchy. This makes them worthy of some separation in the templates list:
Original issue
There have been a few issues (https://github.com//issues/44302, https://github.com//issues/42325, https://github.com//issues/48589) where the idea of grouping templates has come up. Doing so would enable a couple of practical use cases in the near term:- Improve the presentation in the list in the Site Editor's Templates panel (e.g. Improve organization of templates to reflect importance/hierarchy #44302 (comment)).
- Delineate the purpose of some confusing templates like Home
- Allow us to simplify the Add Template menu which gets very long as you add more plugins
My initial thought would be to use post types as a primary grouping method, with some ad hoc groups for certain core templates. Example:
| Pages | Blog / Posts | General | Custom |
|---|---|---|---|
| Front Page Page Attachment † Privacy Policy |
Home Single Post Category Tag Date Author |
Taxonomy Archive Singular Search 404 Custom |
Any custom templates |
† I believe attachments are technically posts, but Pages feel like a better fit, in my mind at least.
I think this method can scale quite nicely to accommodate custom post types. It also opens the door to much simpler feature toggling in the future. For example adding a Blog to a site that doesn't already have one could be a single action that adds Home, Single, Category, Tag, Date, Author all at once. By extension it could even be a gateway to a UI for creating custom post types / taxonomies.
Before we can enable any such refinements/actions in the UI, I presume we'll need to install an API, and of course decide on how to group templates. That's what this issue is for. The above is only an initial suggestion to kick off discussion.
Metadata
Metadata
Assignees
Labels
Type
Fields
Give feedbackProjects
Status