WP_Query::rewind_posts
Rewinds the posts and resets post index.
Method of the class: WP_Query{}
No Hooks.
Returns
null. Nothing (null).
Usage
global $wp_query; $wp_query->rewind_posts();
Changelog
| Since 1.5.0 | Introduced. |
WP_Query::rewind_posts() WP Query::rewind posts code WP 7.0
public function rewind_posts() {
$this->current_post = -1;
if ( $this->post_count > 0 ) {
$this->post = $this->posts[0];
}
}