have_posts()) { $loop->the_post(); $post_id = get_the_ID(); ?>
in:
have_posts() && $loop->found_posts >= 10 ) { ?>