Why are my queries interfering with the global post variable?
$the_query->the_post(); is populating the global $post with each post in that loop. On front-end queries, you’d normally call wp_reset_postdata() after running a secondary query loop, but that doesn’t work on the admin side. Use get_posts instead of WP_Query, and iterate over the results with a foreach loop- $my_posts = get_posts( $args ); if( !empty( $my_posts … Read more