-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
FSE - Template meta information and post type support do not work #31704
Comments
Hi there, Many thanks for your feedback, however it is not visible here. Seams like you did not understand the issue correctly. The template appears in "Templates" dropdown in any post type, ie: "postTypes" restriction in Thanks |
I can reproduce this as well. For example, if I create a "customTemplates": [
{
"name": "single-product",
"title": "Product page",
"postTypes": [
"product"
]
}
] to my It seems to be related to this
I think this was regressed in #30438, specifically in these changes: 7c134eb#diff-603069a6df3015f09478e5ed97c90a404f2e17fb29dc7af5467dac8131acc1c6. cc @youknowriad for awareness and in case you think this is something that needs to be prioritized. |
Created PR that should fix the I'm working on excluding templates based on "postTypes" PR should be ready shortly. |
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
my-custom-template.html
file within current active theme's "block-templates" folderCode snippet
part to active theme'sexperimental-theme.json
fileExpected 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 title
instead ofmy-custom-template
based onexperimental-theme.json
file configurationActual behaviour
postTypes
restriction does not workmy-custom-template
instead ofThe template title
Screenshots or screen recording (optional)
Code snippet (optional)
WordPress information
Device information
The text was updated successfully, but these errors were encountered: