You need wp_count_comments()
.
$comments_count = wp_count_comments();
$comments_count->moderated; // (int) comments in moderation
Related Posts:
- How to change the email notification recipient (user) for new comments?
- 3 moderators to approve comment
- How to auto-approve internal pingbacks?
- Exclude internal links from comment moderation?
- Multiple Comment Moderators and Notifications
- Add delete, approve, spam Links to Comments
- Capability for allowing user to post own comments without moderation
- Why do comment moderators need to have all create/edit/delete toboth posts and pages?
- Community Moderation Plugin for Comments [closed]
- Allow contributors to moderate comments comments on posts they write
- Hold comments for moderation only if user is not logged in
- show if comment is in moderation
- Reject Comments Based on Author Email
- Author can only see own post comment and can moderate
- How to moderate (manually approve) comments of a specific (registered) User
- Comment Moderation and CDN Caching
- WordPress comments – how to check if comment still needs to be approved?
- Why does akismet prevent jetpack comments from appearing in my moderation queue? [closed]
- How Do I Allow Comment Moderation for Other User’s Posts?
- Sending comment notifications to different recipients depending on taxonomy terms
- Who approved a comment, to show up in dashboard
- Can I allow registered users to comment without being logged in or having to be approved?
- Comment moderation
- Disable comment moderation in multisite
- Comment Blacklist
- Embed a page within WordPress dashboard?
- comment awaiting moderation
- Customize the new comment notifications sent to the post author after the comment is approved
- How to rearrange fields in comment_form()
- Commenting in user profile page?
- How do I delete all comments from a specific old blog post?
- Removing the “Website” Field from Comments and Replies?
- How to load and show comments with AJAX instead of pagination?
- Comments not appearing at all
- get recent comments of a particular category
- Hook/Filter before and after comments
- Comment form validation
- Is it possible to move a comment that should be a reply to another comment?
- Can I seperate comments from post?
- I have tried using Plugins to remove 72K comments with no success
- Display commenter’s registration date on comments?
- How do I display the commentor’s first name and last name in the comments?
- show un-approved comments at wordpress front end
- Send Notifications to All Admins
- Disable comments
- Bots posting comments on pages
- default callback function in wp_list_comments
- Why are authors allowed to approve comments on their posts? How to revoke privilege?
- Why is comments_template() working without a comments.php file?
- Comments deactivated
- List user comments in author page
- Filter custom posts with / without comments
- Display comments on homepage of twenty seventeen theme
- How to dynamic Heart Like in WordPress?
- Delete all one-word comments
- Assign author to comment from post edit page
- The “\” is missing when comments is updated
- Using defer or async JavaScript attributes prevents pingbacks and trackbacks from being sent
- Posting comment returns 404
- How-To and Troubleshooting Canonical Links for Paginated Comments
- How to hide trackbacks on wp-admin/edit-comments.php
- Get comments only for certain specific users in template file
- Using a static callback on wp_insert_comment
- How to direct user after comment save
- Show comment pop up links as text only
- Displaying comments on pages distinguished by GET IDs
- Is there a hook to update / replace values in the “Enable threaded (nested) comments x levels deep” drop down?
- Update comment meta for all comments of specific post
- How to change comment texts that has a specific comment_ID – Hook into comment
- counting trackbacks, pingbacks and comments of a post
- Adding comments section to website integrated WordPress instance
- How to Define Custom Number of Items in Comment Feed
- Modify links in user comments
- How indicate when a functions was upgraded in relationship to the entire program [closed]
- Empty comments field or
- infinite loop on page with comments after changing comments.php and header.php
- What templates/funtions needed in custom theme to allow comments the new 3.0 way
- Default Gravatar not showing for pings
- How include comment and post count of user in this custom query
- Prevent users to delete comments from trash
- How can I hide comment of the authors from their published posts?
- How to customize ‘children comments’ in WordPress?
- How to display replies to his comments in user profile of current user
- Top rated posts Average rating issue
- Disallow Comments
- Keep comment author’s name on their comment even when their account is deleted
- WordPress Commenting System User access and Security
- Comments.php is not getting called on main blog page
- Allowing comments on author pages
- Comment section not appearing on posts
- How can I see whether a commenter has subscribed to be notified of replies / other comments to a post
- Where is the Leave a Comment link set
- URLs to user page is broken
- Auto disable comments with custom field
- I want to fill the comment with the comment count?
- delete user not working
- How to remove or customize “Comment” in comments form?
- Comments on pages not appearing, even though I enabled them
- check if a comment was made by a registered user
- comment_approved custom value