-
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
UI: Add Page Templates #991
Comments
The Order field should be a |
That was bad mockup copy/pasta on my part, sorry :) I meant for it to be a plain input field, but type="number" is even better. |
Hm I'm not sure about the
|
My takeaways from this post are: validation isn't always reliable (maybe not a blocker?), shows a small input by default (could be resolved by styling or
That's a shame. If this becomes a blocker, maybe it could be enough to recreate the effect with a |
This is something that needs to be added. For v2 we'll rethink how you select templates, maybe with an upfront selection process like when creating a new slide in keynote or pages document. |
I'd like to see, probably in v2, page templates that specify the blocks that they allow, their order, how many of each type, and so on. When they do these blocks then get added to the editor as locked. This could be added to the page template metadata PHP docblock comment. |
See also #1654 |
Added "Needs API Endpoint" label. To my knowledge, there's currently no way to retrieve available page templates from the REST API. |
Something else to note is that the list of available page templates can actually vary from page to page, due to the |
This is important to have, let's try to work on this soon. |
Just wondering about the status of including page templates. I just downloaded the recent version and there is no where to choose a page template. I like idea of adding certain blocks based on a CPT but there are plenty of times where there is NO CPT created but I still need to use a custom template. So just checking on the status of how and when the ability to choose a custom template from the Gutenberg editor. |
I would like to see this functionality too! |
@brothman01 This feature has since been implemented, so it should be available for you to use. If you're not seeing the option, can you verify that you're editing a page? Can you provide more information about the theme you're using, and which page templates you're expecting to see? |
aduth, thanks for the information. Yes it is showing up now. Thanks! |
Still not seeing it, running Gutenberg 3.7 on WordPress 4.9.8 |
@gmariani Make sure that your theme is loading at least one page template, because if your theme is not, then it won't show up. |
@ajvillegas I am also not able to see any page template selectors, and I'm pretty sure that my theme is loading up a template. I'm just using a modified version of twentyseventeen. |
I'm not seeing it either, and I KNOW there are page templates on the site/theme I'm editing. The site and theme in question have not changed in any way other than the update to WP5, so clearly this is a WP5/Gutenberg issue. (And FWIW, I actually love Gutenberg, can't wait for it to be perfect.) |
@jcklpe @ChazzLayne If possible, could you provide a set of steps that someone could follow to reproduce the issue? Particularly considering whether there's a specific (publicly-available) theme / post type combination under which valid templates are not appearing. It may be worth providing these as part of a new issue targeted at missing templates, rather than continuing the discussion here, since it will be more visible / actionable that way. |
WordPress 5.0.3 running Twenty Nineteen theme. No template options in Add New Page. :( |
@stellalabella The Twentynineteen theme does not include any custom page templates, which is the likely explanation for them not being shown in the editor. The same can be seen in the classic editor using the Classic Editor plugin. |
Update! I installed Sela theme which is known to have page templates, and it worked. I have installed Wordpress 5.1. Template option is not available in Add new page also. I tried several themes just in case, and yet, none one of them got their template option displayed in the edit page. Only the parent page and order options were available. |
Same here, no "Page Template" option under "Page Attributes", and I'm sure that I have a template file in my theme folder like "templatename.php". /* Oh and the WordPress version is 5.3.2 That's weird. |
When you use the editor to edit a page, you need to be able to pick a template, set the order, and parent.
Those three properties are very likely to change in the future. But they are nonetheless important to be able to set in a transitional period.
What's the best way to approach this?
Here's a quick mockup of a transitional metabox that would be good to retire once something superior can replace it:
The text was updated successfully, but these errors were encountered: