Query Ignoring ‘exclude’ Parameter?
WP_Query does not support an exclude argument. To exclude a post by ID, use post__not_in and pass it an array of IDs. Using your code above, your arguments could look like this: $args2 = array( ‘posts_per_page’ => 3, ‘post_type’ => ‘post’, ‘ignore_sticky_posts’ => 1, ‘orderby’ => ‘rand’, ‘tag__in’ => array( $first_tag, $second_tag ), ‘post__not_in’ => … Read more