You code use $the_query->setup_postdata()
or $the_query->the_post()
(the_post()
using setup_postdata()
). Because setup_postdata()
uses global $wp_query
, the_post()
uses global $post;
--> After get_post()
& get_posts()
, don't need to using wp_reset_postdata()
ref: