You have to call the_post()
within your loop, otherwise you’ll output the first post in an infinite loop, as have_posts()
will always be true.
$queryScience->the_post();
Also, you don’t need wp_reset_query()
with WP_Query
, wp_reset_postdata()
is enough.