Get post ID’s from one query and exclude from another
While running the loop of the first query, just collect the IDs into an array. Example: // define your first query’s arguments $args1 = array( … your first query args ); $query1 = new WP_Query($args1); while ( $query1->have_posts() ): $query1->the_post(); // this is your loop. Do whatever you want here // add this in the … Read more