diff --git a/wp-includes/functions.php b/wp-includes/functions.php index a575904e9..610969689 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -736,8 +736,11 @@ function wp_remote_fopen( $uri ) { function wp( $query_vars = '' ) { - global $wp; + global $wp, $wp_query, $wp_the_query; $wp->main( $query_vars ); + + if( !isset($wp_the_query) ) + $wp_the_query = $wp_query; }