wp_reset_postdata() or wp_reset_query() after a custom loop?
The difference between the two is that wp_reset_query() – ensure that the main query has been reset to the original main query wp_reset_postdata() – ensures that the global $post has been restored to the current post in the main query. Indeed, looking at the source you’ll see that the wp_reset_query() calls wp_reset_postdata(). The only difference … Read more