1.

What is the difference between wp_reset_query() and wp_reset_postdata() in WordPress?

Answer»
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()


Discussion

No Comment Found