2
我可以使用get_comments
获得wordpress评论列表。 例如:获取没有引用的wordpress评论?
$comments = get_comments('status=approve&number=10');
它也返回引用通告。是否有可能只获得人的意见(没有引用等)?谢谢。
我可以使用get_comments
获得wordpress评论列表。 例如:获取没有引用的wordpress评论?
$comments = get_comments('status=approve&number=10');
它也返回引用通告。是否有可能只获得人的意见(没有引用等)?谢谢。
我相信:
$comments = get_comments('status=approve&number=10&type=comment');
退房的documentation reference,虽然在get_comments()
的情况下,它不是特别有帮助。
此外,另一个可能的语法,我觉得更清洁,是上述语法相当于:
$args = array(
'status' => 'approve',
'number' => 10,
'type' => 'comment',
);
$comments = get_comments($args);
的$args
数组定义得到的意见,当你想的约束。
非常感谢,这非常有帮助。 – user966585