Rabbit

Tutorials

How do the front-page.php and home.php templates differ in WordPress?

The front-page.php and home.php templates create a lot of confusion in WordPress. This post aims to show which template is used to display example.com, example.com/home/ and example.com/blog/ when the different “Front page displays” options are set under Settings > Reading.

example.com
front-page.php only home.php only Both exist
Your latest posts front-page.php home.php front-page.php
Front page: Home front-page.php page.php front-page.php
Posts page: Blog index.php home.php home.php
Front page: Home and Posts page: Blog front-page.php page.php front-page.php
example.com/home/
front-page.php only home.php only Both exist
Your latest posts page.php page.php page.php
Front page: Home front-page.php page.php front-page.php
Posts page: Blog page.php page.php page.php
Front page: Home and Posts page: Blog front-page.php page.php front-page.php
example.com/blog/
front-page.php only home.php only Both exist
Your latest posts page.php page.php page.php
Front page: Home page.php page.php page.php
Posts page: Blog index.php home.php home.php
Front page: Home and Posts page: Blog index.php home.php home.php

Note that in order to test, I first created a “Home” page and a “Blog” page by going to Pages > Add New.

Posted by on .

0 comments

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>