我们有一个带有以下参数的自定义WP\\U查询: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
],
],
];
我们希望排除那些也分配给子类别的帖子。我的意思是,我们有一些条款:
--父级1
--父级2
------儿童1
--父级3
我们希望在父级2中获得帖子,但是not 这些也分配给子1。
有可能吗?你有什么建议吗?
谢谢