mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-05 17:50:03 +00:00
Preserve the original query object as wp_the_query so that it's not stomped by subsequent calls to query_posts().
git-svn-id: https://develop.svn.wordpress.org/trunk@4460 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -11,8 +11,9 @@ function get_query_var($var) {
|
||||
}
|
||||
|
||||
function &query_posts($query) {
|
||||
global $wp_query;
|
||||
return $wp_query->query($query);
|
||||
unset($GLOBALS['wp_query']);
|
||||
$GLOBALS['wp_query'] =& new WP_Query();
|
||||
return $GLOBALS['wp_query']->query($query);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user