[wp-trac] [WordPress Trac] #9105: with empty 'show_on_front' option is_front_page always show false

WordPress Trac wp-trac at lists.automattic.com
Thu Feb 12 04:16:46 GMT 2009


#9105: with empty 'show_on_front' option is_front_page always show false
--------------------------+-------------------------------------------------
 Reporter:  kookoooo      |       Owner:  anonymous    
     Type:  defect (bug)  |      Status:  new          
 Priority:  normal        |   Milestone:  2.8          
Component:  General       |     Version:  2.7          
 Severity:  normal        |    Keywords:  is_front_page
--------------------------+-------------------------------------------------
 maybe just me, I don't have a 'show_on_front' value in db, by default the
 latest posts shows, but function is_front_page() won't work.

 orig
 {{{
 function is_front_page () {
 // most likely case
 if ( 'posts' == get_option('show_on_front') && is_home() )
 return true;
 }}}
 should be
 {{{
 function is_front_page () {
 // most likely case
 if ( (!get_option('show_on_front') || 'posts' ==
 get_option('show_on_front')) && is_home() )
 return true;
 }}}

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/9105>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list