-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Closed
Labels
[Feature] Template Editing ModeRelated to the template editor available in the Block EditorRelated to the template editor available in the Block Editor[Status] In ProgressTracking issues with work in progressTracking issues with work in progress
Description
Description
Custom template configuration in experimental-theme.json
file does not work neither in default themes nor in custom ones.
Step-by-step reproduction instructions
- Create
my-custom-template.html
file within current active theme's "block-templates" folder - Add configuration from
Code snippet
part to active theme'sexperimental-theme.json
file - Go to admin panel and go to "Posts -> Add New"
- In the opened screen open "Template dropdown"
Expected behaviour
Template
dropdown should not contain above mentionedmy-custom-template
as an option because it should not be available for any post type butpage
.- The template name must be read as
The template title
instead ofmy-custom-template
based onexperimental-theme.json
file configuration
Actual behaviour
- Template is available in all post types:
postTypes
restriction does not work - Template name is read as
my-custom-template
instead ofThe template title
Screenshots or screen recording (optional)
Code snippet (optional)
...
"customTemplates": [
{
"name": "my-custom-template",
"title": "The template title",
"postTypes": [
"page"
]
}
]
...
WordPress information
- WordPress version: 5.7.1
- Gutenberg version: 10.5.4
- Are all plugins except Gutenberg deactivated? Yes
- Are you using a default theme (e.g. Twenty Twenty-One)? No
Device information
- Device: Desktop
- Operating system: Windows 10
- Browser: Chrome 90.0.4430.93 (Official Build) (64-bit)
Metadata
Metadata
Assignees
Labels
[Feature] Template Editing ModeRelated to the template editor available in the Block EditorRelated to the template editor available in the Block Editor[Status] In ProgressTracking issues with work in progressTracking issues with work in progress