have_posts() ) { while ( $query->have_posts() ) { $query->the_post(); ++$counter; ?>

1 ) { ?>