[wp-trac] Re: [WordPress Trac] #10048: Condition tag is_home() returns wrong result if it is called after query_posts()

WordPress Trac wp-trac at lists.automattic.com
Sat Jun 6 12:27:20 GMT 2009


#10048: Condition tag is_home() returns wrong result if it is called after
query_posts()
--------------------------+-------------------------------------------------
 Reporter:  kamiyeye      |       Owner:     
     Type:  defect (bug)  |      Status:  new
 Priority:  high          |   Milestone:  2.8
Component:  General       |     Version:  2.8
 Severity:  major         |    Keywords:     
--------------------------+-------------------------------------------------

Comment(by dd32):

 Yes, Using query_posts() overrides the current global loop.

 AFAIK you should use a custom loop (ie. new WP_Query) instead if you wish
 to retain THE loop whilst having your own loop.

 See also: #9854

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


More information about the wp-trac mailing list