1

I have an issue where home.php won't load, so wordpress insists of using index.php to display blog posts. I created home.php by copying the entire content of index.php into home.php. Is there a way to force wordpress to load a specific template or what is the process involved in solving such a situation? (I use the roots.io theme if it makes any difference.)

  • Please attempt to repeat the issue using a core-bundled Theme such as Twenty Twelve/Thirteen/Fourteen. Very likely, this issue is specific to the Roots Theme, and you'll need to consult that Theme's support offerings. – Chip Bennett Jan 17 '14 at 19:25
2

You say you copied the entire content of index.php into home.php but I assume you have made some changes? Because if not the pages looks identical so maybe it is loading, but just the same?

Now are you having posts or pages you want to display on your front page? Because for the posts and pages there is different hierarchy (from left the first template that is loaded, if it doesn't exist the next one):

  • Posts: front-page.php > home.php > index.php
  • Pages: front-page.php > $custom.php > page-$slug.php > page-$id.php > home.php > index.php

So for starters to solve this make a distinct change in home.php to see when it's loaded and then switch to posts for the front page (since it's simpler) and check if it works. If there is no front-page.php it HAS to load home.php. If it doesn't it's then a theme specific bug of some sort in which case please contact the author.

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.