[theme-reviewers] index.php , home.php and blog-page.php
Imon Themes
imon.theme at gmail.com
Thu Jun 26 16:02:38 UTC 2014
can i make index.php as blog page
mean i can use this code in index.php header
<?php
/* Template Name: Blog */
get_header();
?>
and make home.php as default font page
thanks
On Thu, Jun 26, 2014 at 9:56 PM, Chip Bennett <chip at chipbennett.net> wrote:
> 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
>>
>>
>
> _______________________________________________
> theme-reviewers mailing list
> theme-reviewers at lists.wordpress.org
> http://lists.wordpress.org/mailman/listinfo/theme-reviewers
>
>
--
*Imon Themes*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wordpress.org/pipermail/theme-reviewers/attachments/20140626/6cc4e006/attachment.html>
More information about the theme-reviewers
mailing list