Create Custom Static Front Page and Blog Page.

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:

Custom Blog Posts Index Page Template

To create a custom blog posts index template, include the following in the Theme:

  • home.php

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:

  1. 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.
  2. 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.
Please follow and like us:

Leave a Reply

Your email address will not be published. Required fields are marked *