2

Is there any 'official' way to get the number of comments, awaiting moderation? I've taken a look at get_comments_status - is it what I need or are there other methods?

3

You need wp_count_comments().

$comments_count = wp_count_comments();
$comments_count->moderated; // (int) comments in moderation 

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.