[theme-reviewers] index.php , home.php and blog-page.php

Chip Bennett chip at chipbennett.net
Thu Jun 26 15:56:04 UTC 2014


You cannot use blog-page.php custom page template for the blog posts index.
You must correctly implement the core Template Hierarchy, which uses the
home.php template file for the blog posts index.

Users set up a static front page like so:

1. Create two static pages, which we'll call "Front Page" and "Blog"
2. In Settings -> Reading, set "Front page displays" to "a static page"
3. In Settings -> Reading, set "Front page" to "Front Page"
4. In Settings -> Reading, set "Posts page" to "Blog"

Now, in that scenario (the correct way to set up a static front page), if
the user assigns "blog-page.php" to the "Blog" page, which has been
assigned as the "Posts page", the "blog-page.php" custom page template will
be completely ignored. WordPress simply won't use it. WordPress will only
use the home_page_template() hierarchy, which is:

1. home.php
2. index.php

WordPress will simply never use a custom page template for the blog posts
index. The only way to get WordPress to use it is to provide different
setup instructions for configuring a static front page.

All is explained here:
http://www.chipbennett.net/2013/09/14/home-page-and-front-page-and-templates-oh-my/




On Thu, Jun 26, 2014 at 10:45 AM, Imon Themes <imon.theme at gmail.com> wrote:

> Hi,
> i have little confusion about this .can any body  clear it  ?
>
> 1)can i use those three page in my theme index.php , home.php and
> blog-page.php
>
> 2) can i use only index.php and  blog-page.php in my theme
>
> which one i can make as a defaults  font page in my theme ?
>
> thanks
>
> --
> *Imon Themes*
>
>
> _______________________________________________
> theme-reviewers mailing list
> theme-reviewers at lists.wordpress.org
> http://lists.wordpress.org/mailman/listinfo/theme-reviewers
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wordpress.org/pipermail/theme-reviewers/attachments/20140626/17ee02b4/attachment.html>


More information about the theme-reviewers mailing list