[wp-trac] [WordPress Trac] #6801: Should have a template file for front page

WordPress Trac wp-trac at lists.automattic.com
Wed Dec 23 17:20:29 UTC 2009


#6801: Should have a template file for front page
---------------------------+------------------------------------------------
 Reporter:  AaronCampbell  |        Owner:  westi    
     Type:  enhancement    |       Status:  reviewing
 Priority:  normal         |    Milestone:  3.0      
Component:  Template       |      Version:           
 Severity:  normal         |   Resolution:           
 Keywords:  has-patch      |  
---------------------------+------------------------------------------------
Changes (by westi):

  * keywords:  has-patch commit => has-patch


Comment:

 Been thinking about this a bit while reviewing this patch and have the
 following counter proposal:

  * is_home() stays as is and always does home.php -> index.php
  * is_front_page() is put at a higher priority than is_home() and does:
   * For page on front: front-page.php -> _wp_page_template -> page-
 slug.php -> page-id.php -> page.php
   * For posts on front: front-page.php -> home.php -> index.php

 This way for {{{is_front_page()}}} the most specific template gets used
 first and I think gives the most consistent behaviour for theme
 developers.

 If they put a front-page.php in the theme it will always be used for the
 root of the site whatever the config.

 Then depending on the type of post on the front page we follow the normal
 rules for that type.

 New patch incoming for discussion.

 Removing commit for now.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/6801#comment:43>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list