根据Codex entry:
“post\\uu not\\u in(数组)-使用post ID。指定不检索的post。If this is used in the same query as post__in, it will be ignored.“”
尝试创建一个要显示的帖子id数组,或创建一个要排除的帖子id数组,而不是同时尝试这两种操作。
编辑:如果要使用当前代码排除特定的页面集,只需删除$args
, 您的查询应在以下时间后运行:
$exclude_ids = array(294,278,6758,9582,9674,8638,8585,7359);
$args = array(
\'paged\' => $paged,
/***** \'post__in\' => $ids, ***** Remove this line *****/
\'post__not_in\' => $exclude_ids,
\'posts_per_page\' => -1,
\'post_type\' => \'page\',
\'orderby\' => \'menu_order\',
\'order\' => \'ASC\'
);
$my_query = new WP_Query($args);