-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Template part general area causes php error. #49407
Comments
The IIRC, the label was updated later, and the slug was kept for backward compatibility. |
I propose opening this as a new documentation issue for the theme developer handbook, and closing this issue. Currently the documentation only says
And the theme.json documentation says:
So there is room to clarify uncategorized and general. |
I encountered a similar issue with current WordPress core: {
[...]
"templateParts": [
{
"name": "example",
"title": "Generic example"
}
]
} When |
Description
When I assign a template part to general in theme.json like this:
I get a php error on the front end like this:
“general” is not a supported wp_template_part area value and has been added as “uncategorized”.
If I change the value in theme.json to
"area": "uncategorized"
the error goes away.Shouldn't general be a supported template part area value? You can select it in the site editor. I'm not sure why doing it in code causes an error.
Step-by-step reproduction instructions
Screenshots, screen recording, code snippet
No response
Environment info
WordPress: 6.1.1
Gutenberg: 15.0.1
Theme: Valet (custom)
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
No
The text was updated successfully, but these errors were encountered: