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

Philip M. Hofer (Frumph) philip at frumph.net
Thu Jun 26 16:48:27 UTC 2014


Please take note that this is if you use the internal loop pre-parser, you can do your own loop segment for the blog with paging and everything within a template.



From: Chip Bennett 
Sent: Thursday, June 26, 2014 9:08 AM
To: Discussion list for WordPress theme reviewers. 
Subject: Re: [theme-reviewers] index.php , home.php and blog-page.php

Yes, there are currently approved Themes that are doing it wrong. That's why I wrote a tutorial on it, and why I've been placing so much emphasis on it during final approval.



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

  by the way @chip  

  i checked some currently approved theme using blog-page.php



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

    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 





  -- 

  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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wordpress.org/pipermail/theme-reviewers/attachments/20140626/b4a5a474/attachment-0001.html>


More information about the theme-reviewers mailing list