Make WordPress Core


Ignore:
Timestamp:
11/09/2006 06:50:58 AM (19 years ago)
Author:
ryan
Message:

Preserve the original query object as wp_the_query so that it's not stomped by subsequent calls to query_posts().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/query.php

    r4457 r4460  
    1212
    1313function &query_posts($query) {
    14     global $wp_query;
    15     return $wp_query->query($query);
     14    unset($GLOBALS['wp_query']);
     15    $GLOBALS['wp_query'] =& new WP_Query();
     16    return $GLOBALS['wp_query']->query($query);
    1617}
    1718
Note: See TracChangeset for help on using the changeset viewer.