• What is the difference between these three things?

    <?php wp_reset_postdata(); ?>
    <?php wp_reset_query(); ?>
    <?php rewind_posts(); ?>

Viewing 1 replies (of 1 total)
  • wp_reset_postdata() – Restores global $post to the current post in the main query.
    Used after every custom WP_Query()

    wp_reset_query() – Reset the main query.
    Used after every query_posts() loop

    rewind_posts() – Rewind the loop so you can re-use the same query.
    Used in situations where you want to run the same query in two different locations on the same page.

Viewing 1 replies (of 1 total)
  • The topic ‘Reset, rewind?’ is closed to new replies.