[wp-trac] Re: [WordPress Trac] #4821: wp_list_categories() messes up the current category

WordPress Trac wp-trac at lists.automattic.com
Mon Aug 27 15:35:50 GMT 2007


#4821: wp_list_categories() messes up the current category
---------------------+------------------------------------------------------
 Reporter:  xtc62    |        Owner:  anonymous 
     Type:  defect   |       Status:  closed    
 Priority:  low      |    Milestone:  2.4 (next)
Component:  General  |      Version:  2.2.2     
 Severity:  trivial  |   Resolution:  invalid   
 Keywords:           |  
---------------------+------------------------------------------------------
Changes (by ryan):

  * status:  new => closed
  * resolution:  => invalid

Comment:

 You have to restore the original query.

 {{{
 $GLOBALS['wp_query'] =& $GLOBALS['wp_the_query'];
 }}}

 In 2.3 you can use wp_reset_query().

-- 
Ticket URL: <http://trac.wordpress.org/ticket/4821#comment:3>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list