查看您传递给get\\u comments()的参数,并将它们与WordPress Codex.
您的示例-
$args = array(
\'include\' => $postids,
\'meta_query\' => array(
array(
\'key\' => \'viewed_status\',
\'value\' => \'unseen\'
)
),
\'count\' => true
);
codex示例-
$defaults = array(
\'author_email\' => \'\',
\'ID\' => \'\',
\'karma\' => \'\',
\'number\' => \'\',
\'offset\' => \'\',
\'orderby\' => \'\',
\'order\' => \'DESC\',
\'parent\' => \'\',
\'post_id\' => \'\',
\'post_author\' => \'\',
\'post_name\' => \'\',
\'post_parent\' => \'\',
\'post_status\' => \'\',
\'post_type\' => \'\',
\'status\' => \'\',
\'type\' => \'\',
\'user_id\' => \'\',
\'search\' => \'\',
\'count\' => false
);
当文档清楚地指示一个一维数组时,您正在传递一个多维数组当文档明确指出需要一个整数时,您还传递了一个“Post id”数组