[英]wordpress - show comments only comments who are approved
我正在建立某种评论档案,我在这里查看: http : //codex.wordpress.org/Function_Reference/get_comments
没有看到可以帮助我的“数组”
这是我的代码的一部分:
function process_post(){
Function sheker() {
$args = array(
what to put here ??????????????
);
// The Query
$comments_query = new WP_Comment_Query;
$comments = $comments_query->query( $args );
// Comment Loop
有任何想法吗 ?
使用以下代码,您可以获取所有批准的注释( 检查参数 )
$args = array('status'=>'approve');
$comments = new WP_Comment_Query( $args );
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.