If you have troubles since the update to WordPress 4.5 please read this post before opening a new thread.
I am trying to make changes to one of the Page Templates (template_blog.php) and am looking to introduce a new template to cope with specific requirements.
I have made the changes to template_blog.php and uploaded it, but the changes are not being picked up.
Also, how do I introduce a new page atrributes template? I have found the various locations in the code where the templates are referenced, but haven’t worked out how to get it to show up as an option when creating a page.
1) Please check that you uploaded the file to the right directory. If you replceed the old template_blog.php with the new one you MUST see the changes. If not please check if you cached your page (W3 Edge etc. plugins), if your changes are correct and visible (visible to users or only background changes (php loops, etc.) ) and if you modified the right template.
2) To introduce a new template just copy and paste an existing template into your themes folder and rename it by changing the template name .ie.
Template Name: Contact Form
Template Name: My Form
To add a page attribute template (meta box) you need to use following code:
add_meta_box( 'select_post_template', __( 'Post Template', 'custom-post-templates' ), 'select_post_template', 'post', 'side', 'default' );
This will add a meta box to your page/post editor located in the right sidebar. This is only an example – you need to adjust all parameters to your function/template. Have a look at the reference.: http://codex.wordpress.org/Function_Reference/add_meta_box
The topic ‘Changes to Page Templates’ is closed to new replies.