1st query:
$exclude_post_top_stories="";
// WP_Query arguments
$args = array (
'post_status' => array( 'publish' ),
'posts_per_page' => '-1',
'order' => 'DESC',
'orderby' => 'date',
);
// The Query
$exclude_query = new WP_Query( $args );
// The Loop
if ( $exclude_query->have_posts() ) {
while ( $exclude_query->have_posts() ) {
$exclude_query->the_post();
// do something
$exclude_post_top_stories[] = get_the_id();
}
} else {
// no posts found
}
// Restore original Post Data
wp_reset_postdata();
2nd query:
$args = array(
'posts_per_page' => 2,
'post_not_in' => $exclude_post_top_stories,
'post_type' => 'post',
'post_id' => $post_id,
'category_name' => 'News
);