[wp-trac] [WordPress Trac] #21790: When set a static front page WP main query isn't set correctly

WordPress Trac wp-trac at lists.automattic.com
Wed Sep 5 06:52:34 UTC 2012


#21790: When set a static front page WP main query isn't set correctly
--------------------------+------------------------------
 Reporter:  markoheijnen  |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Query         |     Version:  3.4.1
 Severity:  normal        |  Resolution:
 Keywords:  dev-feedback  |
--------------------------+------------------------------

Comment (by markoheijnen):

 For me to see the notices is to set a static blog and front page. and use
 a function like is_front_page. I'm going to try if I can write an unit-
 test to make it visible. Not sure yet how to create this situation and
 where to check on.

 {{{
 function some_random_modification( $query ) {
                 if( $query->is_main_query() && is_front_page() ) {
                 }

                 return $query;
 }
 add_filter( 'pre_get_posts', 'some_random_modification' );
 }}}

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


More information about the wp-trac mailing list