Don't advance post counter when resetting query. see #5439
git-svn-id: https://develop.svn.wordpress.org/trunk@6688 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
8cc330126b
commit
e518fc833f
@ -27,7 +27,7 @@ function wp_reset_query() {
|
|||||||
$GLOBALS['wp_query'] =& $GLOBALS['wp_the_query'];
|
$GLOBALS['wp_query'] =& $GLOBALS['wp_the_query'];
|
||||||
global $wp_query;
|
global $wp_query;
|
||||||
if ( !empty($wp_query->post) ) {
|
if ( !empty($wp_query->post) ) {
|
||||||
$GLOBALS['post'] = $wp_query->next_post();
|
$GLOBALS['post'] = $wp_query->post;
|
||||||
setup_postdata($wp_query->post);
|
setup_postdata($wp_query->post);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user