Created
July 30, 2014 14:53
-
-
Save jpcontrerasv/129f08b13bd95594437e to your computer and use it in GitHub Desktop.
Reset Query
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment