[wp-trac] Re: [WordPress Trac] #9425: The various $is_* variables in $WP_Query should only be set on the very first query call.

WordPress Trac wp-trac at lists.automattic.com
Fri Apr 3 20:04:14 GMT 2009


#9425: The various $is_* variables in $WP_Query should only be set on the very
first query call.
--------------------------------------+-------------------------------------
 Reporter:  mtg169                    |        Owner:  anonymous
     Type:  defect (bug)              |       Status:  reopened 
 Priority:  high                      |    Milestone:  2.8      
Component:  General                   |      Version:  2.7.1    
 Severity:  major                     |   Resolution:           
 Keywords:  needs-patch dev-feedback  |  
--------------------------------------+-------------------------------------

Comment(by mtg169):

 Replying to [comment:1 Viper007Bond]:
 > Does using `$query_string` fix this?

 No, I get the same results when using $query_string. So the $is_*
 variables are reset every time query_posts is called? It makes sense now.
 I was checking $is_home before running query_posts and query_posts was
 only running if $is_home was true. It was confusing me because query_posts
 would run ($is_home was true) but then $is_home was reset to false after
 running query_posts unless I had at least one category excluded.

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


More information about the wp-trac mailing list