mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-05-25 05:34:32 +00:00
Restore global post when resetting the query. Props ionfish. fixes #5439
git-svn-id: https://develop.svn.wordpress.org/trunk@6653 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -27,7 +27,7 @@ function wp_reset_query() {
|
||||
$GLOBALS['wp_query'] =& $GLOBALS['wp_the_query'];
|
||||
global $wp_query;
|
||||
if ( !empty($wp_query->post) ) {
|
||||
$GLOBALS['post'] = $wp_query->post;
|
||||
$GLOBALS['post'] = $wp_query->next_post();
|
||||
setup_postdata($wp_query->post);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user