How to reset the post query and use Multi-Pass Loop in WordPress
A rewind_posts() function is used to reset the post query and loop counter,allowing us to do another Loop using same content as first Loop.Place this function call directly after finishing first loop.
Example:-
Here is an example that processes the main Loop content twice:
<?php while(have_posts()) :the_post(); ?>
<!------content--->
<?php endwhile; ?>
<?php rewind_posts();?>
<?php while (have_posts()) : the_post(); ?>
<!---content---->
<?php endwhile; ?>
Related posts:-
How to secure WordPress website from various attack Hackers,Virus and Spam.
How to display posts from specific category on the front page as feature in Worpress website.
How To Create Link To External Resources In WordPress Without Plugin ?
How to get the content of the page according to page id in WordPress:-
Total Page Visits: 3270 - Today Page Visits: 1