WP_Query::rewind_posts() public WP 1.5.0
Rewind the posts and reset post index.
{} It's a method of the class: WP_Query{}
No Hooks.
Return
Null. Nothing.
Usage
global $wp_query; $wp_query->rewind_posts();
Changelog
Since 1.5.0 | Introduced. |
Code of WP_Query::rewind_posts() WP Query::rewind posts WP 5.6
public function rewind_posts() {
$this->current_post = -1;
if ( $this->post_count > 0 ) {
$this->post = $this->posts[0];
}
}