we have a custom WP_QUERY with these args: https://pastebin.com/drbw0NAG
$args = [
'post_type' => 'post',
'post_status' => 'publish',
'posts_per_page' => $post_number + 1,
'paged' => ( get_query_var( 'paged' ) ) ? get_query_var( 'paged' ) : 1,
'tax_query' => [
[
'taxonomy' => $taxonomy,
'field' => 'term_id',
'terms' => $category_id,
'include_children' => false
],
],
];
We'd like to exclude those post which are also assigned to a child category.
I mean, we have some terms:
-- Parent 1
-- Parent 2
------ Child 1
-- Parent 3
We'd like to get posts in Parent 2 but not those are also assigned to Child 1.
Is it possible? Have you got any suggests?
Thanks