I’m trying to exclude posts that are included in two different options (options_featured_articles) and (options_main_featured_article). When I use either one in the post__not_in it works correctly, I’m just not sure how to combine it so they both work together. Here is what I have:

$query_args = array(
        'post_type'           => 'post',
        'cat'                 => $instance['posts_cat'],
        'showposts'           => $instance['posts_num'],
        'offset'              => $instance['posts_offset'],
        'orderby'             => $instance['orderby'],
        'order'               => $instance['order'],
        'ignore_sticky_posts' => $instance['exclude_sticky'],
        'post__not_in'        => get_option('options_featured_articles')
    );

How do I get it to also exclude the post from the query if its also included in the options_main_featured_article option.

Read more here: WP Query Multiple post__not_in options


Solution:

If you know the solution of this issue, please leave us a reply in Comment section, to update the question.


Wordpress related questions and answers: