7/30/2014 - 2:53 PM

Reset Query

Reset Query

<?php wp_reset_postdata(); ?>
//When to use: best used after custom or multiple loops created with WP_Query.

<?php wp_reset_query(); ?>
//When to use: best used after a query_posts loop to reset things after a custom query.

<?php rewind_posts(); ?>

//When to use: best for re-using the same query on the same page.