You could use get_comments(), this way you don’t have to loop through posts.
<?php
$args = array(
'post_author' => '' // fill in post author ID
);
$author_comments = get_comments($args);
echo count($author_comments);
?>
Related Posts:
- How to properly insert data into custom table via plugin
- Simple form that saves to database
- How to store ACF custom fields data in a custom table
- Set a User as Author of all ‘New Posts’ posted
- Change destination author link
- Don’t send notification if author comments his own post plugin help?
- How to edit/delete single row items in a table on my own menu page
- Improving a Stackoverflow “inspired” badge system to display badges in author page
- How to write one comment and publish on every post using database or plugin?
- Make id column as AUTO INCREMENT on plugin activation
- How can I get WordPress to save comments in markdown format?
- How to access data in wordpress database externally using php
- Notify comment author upon reply
- Change get_current_user_id code to the author’s profile
- Creating a CSV with PHP inside the plugin directory
- Issue running db create table query from static method
- How to create plugin/ page that reads from database
- Comment “like” problem – “users who like this” avatar linking to current user profile instead of “liker’s” profile
- Individual Comment Notification Setting For Post Author
- Is this plugin safe to run?
- How to display results from a data table with an encrypted user id?
- add_action for publish_post doesn’t work
- Getting URL GET parameter with Code snippets and storing it in database?
- Display Author name PHP (Selfmade Plug-IN)
- Cant create table on plugin activation
- How to use WordPress header function and footer function and not load word press database
- Get Shortcode output to database for static post_content
- Moving a few select DB tables to a new WP instance
- How can I store user preferences in WordPress and retreive them later?
- How to get the total count of Favorite/Favorited authors
- Paginated Comments “reply” does not work!
- Displaying friend’s posts only
- How to save information related to post in database?
- How to fix vanilla comments extra iframe space
- Getting Post Permalink Outside of Loop Not Working
- plugin doesn’t retrieve data from database
- How can I delete orphan keys in WordPress database tables?
- Insert query inserts 2 entries, should insert 1
- Adding Custom Fields for Img in Posts
- How to pass JavaScript variable to PHP in wordpress widget?
- Unable to add admin notice on plugin activation
- Prevent WordPress from loading comments
- How can I ‘reactivate’ .PHP files within a WP plugin that have been marked ‘inactive’?
- Akismet plugin is deleting spam despite preferences
- Dashboard Widget Form
- How to ‘clone’ a wp plugin to make small changes
- add mediaelement.js plugins into WordPress video player control bar
- Edit Yoast SEO breadcrumbs output [closed]
- WordPress WPforms customization
- Replace default og:image tag YOAST
- Where these .js file come to source code?
- WordPress Payment gateway add on form , how to add form into list or else how to submit form to next step for payment
- How to Create a shortcode to this php function
- My single.php page does not show the related data to the post which is clicked
- pagination on data fetched using SQL query
- How to check if a taxonomy not exists in a plugin
- How passing values to construct function with Actions?
- Access a particular field in an array
- wordpress add_action() issue in ajax call
- Using ‘mysqli_connect’ ‘crashes’ WordPress client-side
- JQuery prepend a function
- I am trying to make a field show and save from quickedit screen
- Send email with list of active plugins upon activation/deactivation
- get_comments_number() giving wrong results! What are alternatives?
- Error: Can´t access facebook comment plugin admin page
- eaccelerator PHP error
- Looking for a good way to include php code in posts, but using special include markup rather than direct php code
- Strange admin-ajax / CSS / $_SESSION issue
- How to add custom plugin data to the cart in woocommerce using custom button on product page?
- How can I display selected content from a seperate database in an Activity style widget?
- How to create admin setting for this small plugin
- Allowed memory size of 134217728 … wp-includes/wp-db.php on line 1989
- Undefined offset: 0 in WordPress after latest version upgrade [closed]
- $wpdb->delete not working for me
- Post source link plugin – small modification
- Remove a div class with condition
- How to securely controlling data without keeping it in postmeta?
- Hooking into the HTML header container
- PHP Error message Upload images to remote server
- No route was found matching the URL and request method
- Block plugin update possibilities (but not by hiding notifications)
- WP_get_image_editor resizing images in a foreach loop
- CMB2 Output Select Box Chosen Option
- Conditional Fields depending on checkboxes
- Soflyy WP All Import Custom File Download Issue
- WordPress Admin sub-level menu issue
- database – multiple wordpress installations using same database – can they share plugin settings?
- HyperDB failover Delay
- Add class as plugin for other plugins
- Template from scratch: Sidebars not showing widget
- Contact Form 7: custom validation [closed]
- Enforce conditions only for draft posts using WyPiekacz, ignore pending and published posts
- White Screen When Includding A Folder With PHP Files
- What can I do to customize a widget provided with this plugin? from where have I to start?
- Shortcode inside a redirect [closed]
- Attachement title in wpallimport
- Make plugin admin page visible to other roles
- How Create LastMod and Update Date Only on Taxonomy Category and Tags
- Accessing Correct Database to Create REST API Endpoint
- How do I replace a logo image that’s hard-coded into a plugin’s logo.php file?