-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Rename pageTemplates config to customTemplates in theme.json #28830
Conversation
Size Change: -373 B (0%) Total Size: 1.36 MB
ℹ️ View Unchanged
|
Every time I see "page templates" or "custom templates" referenced I need to spend a few seconds figuring out what we mean in the context. The problem is that we have lots of things called "templates", is there any way we can make it a bit easier to understand that this refers to custom templates specifically for pages? |
This is not specifically for "pages", it can work with any custom post type, it just happens that the "pages" are the default CPT where these are applied if you omit the "postType" key. |
One thing I think we need to reconsider is where we declare templates and whether the template metadata could live in the template itself (as This feedback should not block this PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added some minimal docs to this. Verified this works fine.
@@ -476,6 +477,24 @@ These are the current typography properties supported by blocks: | |||
|
|||
[1] The heading block represents 6 distinct HTML elements: H1-H6. It comes with selectors to target each individual element (ex: core/heading/h1 for H1, etc). | |||
|
|||
|
|||
### Other theme metadata |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this @nosolosw
My understanding is that the
If this makes sense, I can help with this, if that's useful. |
Makes a lot of sense. That said, as said by @mtias we might explore finding ways to define these inline in the files themselves in the future. I guess validation would still be useful but implemented differently in that case. |
Created WordPress/theme-experiments#202 for updating TT1-blocks. |
Addresses comments in #27778 (review)
Testing instructions
about.html
/custom.html
... to theblock-templates
folder.customTemplates
property to the root level ofexperimental-theme.json
like soMakes sure the the templates show up on the "page attributes" panel of the editor sidebar.