wp_reset_query() wp_reset_postdata()
This ensures that the query has been reset to the originally created main query. This ensures that the global $post has been restored in the current post inside the main query.
Should be used immediately after every loop using query_posts() Should be used after every custom WP_Query()

Suggest An Answer

No suggestions Available!