When should you use wp_reset_postdata vs wp_reset_query?
wp_reset_postdata() resets the value of the global $post variable to the post property of the main query, which will be whatever post the main query was last on. You would do this if you had used setup_postdata() or $query->the_post() on a custom query. Both of these replace the global $post variable so that functions like … Read more