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