Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I have a child theme with its own home custom page template called "template-home.php" (Template Name: Home Template). I have a "Home" page which uses this template. Everything works fine as long as my Settings > Reading > Front Page Displays is set as "Your latest posts".

But if I set Front page as a static page and I set this page as the "Home" page (which uses the home page template), then WordPress picks the Home page template of the parent theme.

Why is that?

Extra info: the parent theme has the same "template-home.php" attached to the same "Home" page, and has not any home.php or front-page.php file.

share|improve this question
3  
could you clarify what templates you're using - a custom page template, or home.php? have you looked at the Template Hierarchy in Codex? –  Milo Mar 20 at 16:56
    
This question is impossible to answer as-written. What is the template (Parent) Theme? Does it have a front-page.php template file? –  Chip Bennett Mar 20 at 17:20
    
@Milo note: the home.php template file (used to display the blog posts index) won't be applicable in this case - though it could potentially contribute to the issue/confusion. –  Chip Bennett Mar 20 at 17:21
1  
@drake035 no, that's not true. If it exists, front-page.php will be used on your site front page, always and forever, no matter how you have configured "Front Page Displays". –  Chip Bennett Mar 20 at 22:54
1  
WordPress doesn't override custom page templates the same way that it overrides template-hierarchy template files, as far as I know. I'll dig into locate_template() and report back. –  Chip Bennett Mar 21 at 23:56

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.