我正在使用post\\u not\\u in从查询中删除页面,但它忽略了超过2项的内容
我的代码:
$selected_check = array();
$checks = new WP_Query( \'post_type=page&orderby=menu_order&order=ASC&posts_per_page=-1\');
while($checks->have_posts()){
$checks->the_post();
global $post;
$this_check = get_post_meta($post->ID, \'_cmb_hide_home\', true);
if($this_check == \'on\'){
$selected_check[] = $post->ID;
}
}
wp_reset_postdata();
$new_check = implode(", ", $selected_check);
$query1 = new WP_Query(array(
\'post_type\' => \'page\',
\'orderby\' => \'menu_order\',
\'order\' => \'ASC\',
\'posts_per_page\' => \'-1\',
\'post__not_in\' => array($new_check)
));
我的$new\\u checks数组当前为51、76、10、21,但它只处理前2项
我的代码中是否缺少一些东西?