If you build a website on WordPress where you want to create two different page template one for frontpage i.e index page and one for blog page i.e where you show all posts, then you have to know the page name.
Custom Site Front Page Template
To create a custom site front page template, include either of the following in the Theme:
- A Custom Page Template (e.g. template-featured.php for featured content)
Custom Blog Posts Index Page Template
To create a custom blog posts index template, include the following in the Theme:
Use only the home.php template file for the blog posts index. Do not use a Custom Page Template (such as template-blog.php) for two reasons:
- When the static front page feature is configured properly, WordPress will not use a Custom Page Template to display the blog posts index, even if a Custom Page Template is assigned to the page designated as the “Posts page”. WordPress will only use either home.php or index.php.
- When the Custom Page Template is assigned to a static page other than the one designated as the “Posts page,” the blog posts index loop pagination will not work properly.