I've created a twentyfourteen child theme using the One-click child theme plugin. Then I copied the page.php template from the parent theme folder to the file new-template.php in the child folder. I changed the header in new-template.php to
Template Name: New Template
As far as I know that's all I need to do to get "New Template" to show up in the Template dropdown under Page Attributes when you create a new page. But "New Template" hasn't been added to the dropdown. Does anyone know what the problem might be?
Thank for any help
Just in Wordpress 4.9 there's this bug: https://core.trac.wordpress.org/ticket/42573 causing the template files to only be rescanned once every hour.
To fix (until they release a new WP version with this changed), download the patch on that bug ticket and make the changes from the patch to wp-includes/class-wp-theme.php
.
Hope this saves someone the 2 hours I wasted on this..
For the Wordpress 4.9 bug mentioned above, just update the version of your theme in style.css, e.g. from 1.1.2 to 1.1.3 - even 1.1.2-1 will do. This will force updating templates list.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With