Skip to main content
edited tags; edited title
Link
Stephen Harris
  • 32.6k
  • 6
  • 84
  • 118

A question about What is the advantage of using home.php over index.php for the front page

Source Link
byronyasgur
  • 3k
  • 4
  • 34
  • 54

A question about home.php

I am building a theme and wondering whether or not to include a home.php file or not. The theme (which will not be available to the public) will be mainly used with a static home page and separate blog posts page.

My understanding is that including a front-page.php file means that the static home page would be served by that file; and that if I was to include a home.php file then the blog posts would be served by that.

My question is this: If I was happy to use index.php as my blog posts layout instead of home.php then is there any advantage in having a home.php file ? Or to ask it another way: Is the only purpose of home.php that of allowing separate styling/layout of the blog posts page as compared to that of the index.php template (ie the fallback template). I should add that I have included in the theme most of the other templates ( single, archive, page etc) so I really only expect index.php to be used as a fallback and it will only operate in that regard If I've missed something so hopefully not that often.