$wp_query = new WP_Query($query_args); $wp_query = new WP_Query($query_args); if ( $wp_query->have_posts() ) : while ( $wp_query->have_posts()) : $wp_query->the_post(); // do something endwhile; next_posts_link(); previous_posts_link();