rewind_posts()
Rewind the loop posts.
Description Description
Source Source
File: wp-includes/query.php
893 894 895 896 | function rewind_posts() { global $wp_query ; $wp_query ->rewind_posts(); } |
Expand full source code Collapse full source code View on Trac
Changelog Changelog
Version | Description |
---|---|
1.5.0 | Introduced. |
User Contributed Notes User Contributed Notes
You must log in before being able to contribute a note or feedback.
Basic Example
// main loop
<?php
if
(have_posts()) :
while
(have_posts()) : the_post(); ?>
<?php the_content(); ?>
<?php
endwhile
;
endif
; ?>
// rewind
<?php rewind_posts(); ?>
// new loop
<?php
while
(have_posts()) : the_post(); ?>
<?php the_content(); ?>
<?php
endwhile
; ?>