[wp-trac] [WordPress Trac] #11461: When creating a new WP_Query, running the_post() on the new object resets global $post

WordPress Trac wp-trac at lists.automattic.com
Wed Dec 16 19:11:47 UTC 2009


#11461: When creating a new WP_Query, running the_post() on the new object resets
global $post
--------------------------+-------------------------------------------------
 Reporter:  bsdeluxe      |       Owner:  ryan                           
     Type:  defect (bug)  |      Status:  new                            
 Priority:  normal        |   Milestone:  Unassigned                     
Component:  Query         |     Version:                                 
 Severity:  normal        |    Keywords:  the_post, wp_query, scope, post
--------------------------+-------------------------------------------------

Comment(by nacin):

 $post is a global central to a lot of WP functionality. What you're trying
 to do can be done via numerous multiple loop solutions. See
 http://codex.wordpress.org/The_Loop#Multiple_Loops.

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


More information about the wp-trac mailing list