0

I'm using a child theme. I want to override a template of base theme. I created, articles-page.php which starts with:

<?php
/*
Template Name: Articles
*/

While creating a page in Wordpress I can see my template listed in the Page Attributes widget to my right. The problem is, when I change my template setting to "Articles" and hit update. It still shows default. My change is not being saved, hence my template is not being loaded for that page.

0

Try naming the file page-template-articles.php but leave the file contents and header name - "Template Name: Articles" the same.

Right now, you might be running into a reserved naming collision within WP with how Custom Post Type templates are named, i.e. articles-page.php is a page template name for a CPT called articles.

3
  • I tried what you said but it didn't work. And I've tried using variety of compbinations like page-template-xyz.php with Template Name: xyz but still its not saving. I also tried using xyz.php & xyz-page.php with Template Name: xyz still no result. – claws Jan 21 '14 at 4:41
  • What is the base theme? Try your page template as a child theme of a default WP theme, like twentytwelve and see if it works. If it does, it's a theme issue with your base theme. – markratledge Jan 21 '14 at 4:58
  • Wow! I'm surprised to see that its not working with twentytwelve & twentythirteen as base themes. What else could be wrong? – claws Jan 21 '14 at 11:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.