admin管理员组文章数量:1289875
The query string comment__in takes an array of comment IDs to include. I have an array of comment IDs that I would like to assign to comment__in
, such as $args['comment__in'] = $comment_IDs;
. Some comment IDs in $comment_IDs
do not exists in the database and some do. Regardless, when a comment ID exists in the database, it gets returned by get_comments($args)
. However when none of the comments IDs in $comment_IDs
exist in the database, get_comments($args)
returns a large number of comments that are not in $comment_IDs
The question is:
How can I get get_comments($args)
to only return comments specified by $comment_IDs
?
本文标签: wp queryprevent getcomments() from returning comments not in commentin
版权声明:本文标题:wp query - prevent get_comments() from returning comments not in comment__in 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741417277a2377589.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论