我设置了以下查询
$argsar = array (
\'numberposts\' => 1,
\'post_type\' => \'auctionroom\',
\'meta_key\' => \'auctionroom_username\',
\'compare\' => \'=\',
\'value\' => $auctionroomname
);
$the_queryar = new WP_Query($argsar);
if ($the_queryar->have_posts()) {
$causercheck = $the_queryar->found_posts;
$the_queryar->the_post();
$auctionroom_id = get_the_ID();
}
它应该只返回1个结果,但当我得到
$causercheck = $the_queryar->found_posts;
有无numberposts给出了相同的错误总数
感谢您提供的任何线索
RunningWordpress版本:5.5.1,ACF版本:5.9.1