On this page
WP_Query::rewind_posts()
Rewind the posts and reset post index.
Source
File: wp-includes/class-wp-query.php. View all references
public function rewind_posts() {
$this->current_post = -1;
if ( $this->post_count > 0 ) {
$this->post = $this->posts[0];
}
}
Related
Used By
| Used By | Description |
|---|---|
| WP_Query::have_posts() wp-includes/class-wp-query.php | Determines whether there are more posts available in the loop. |
| rewind_posts() wp-includes/query.php | Rewind the loop posts. |
Changelog
| Version | Description |
|---|---|
| 1.5.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_query/rewind_posts