$pages global not updated with multiple WP_Query objects/post loops
|Reported by:||misterbisson||Owned by:||ryan|
setup_postdata() in wp-includes/query.php globalizes the $pages var, then assigns it to either $pages = explode(...) or $pages = $post->post_content depending on whether the $post->post_content is paginated.
However, the var is not properly reset when displaying posts in additional post loops on a given page that is paginated. As coded, only $pages is reset, leaving other elements of the array unchanged. The attached patch corrects the problem.
Change History (4)
comment:1 @misterbisson — 5 years ago
- Component changed from General to Query
- Keywords has-patch added
- Owner set to ryan