Here is just a small code snippet I found for showing the amount of comments a comment author made.

Here’s a function you can use to get and echo the number of comments a comment author made. It’s pretty easy just put it in the functions.php file in your theme.
[php]
function commentCountAuthor(){

$oneText = ‘One comment’;
$moreText = ‘% comments’;

global $wpdb;

$result = $wpdb->get_var(‘
SELECT
COUNT(comment_ID)
FROM
‘.$wpdb->comments.’
WHERE
comment_author_email = "’.get_comment_author_email().’"’
);

if($result == 1):

echo str_replace(‘%’, $result, $oneText);

elseif($result > 1):

echo str_replace(‘%’, $result, $moreText);

endif;

}
[/php]

Then just call the function inside the comments loop and shazam! Magic!
[php]commentCountAuthor();[/php]

Feedback

  Comments: 29


    Warning: call_user_func() expects parameter 1 to be a valid callback, function 'srh_comment' not found or invalid function name in /nfs/c08/h02/mnt/171249/domains/brewerjwebdesign.com/html/wp-includes/class-walker-comment.php on line 180

      Warning: call_user_func() expects parameter 1 to be a valid callback, function 'srh_comment' not found or invalid function name in /nfs/c08/h02/mnt/171249/domains/brewerjwebdesign.com/html/wp-includes/class-walker-comment.php on line 180

        Warning: call_user_func() expects parameter 1 to be a valid callback, function 'srh_comment' not found or invalid function name in /nfs/c08/h02/mnt/171249/domains/brewerjwebdesign.com/html/wp-includes/class-walker-comment.php on line 180

          Warning: call_user_func() expects parameter 1 to be a valid callback, function 'srh_comment' not found or invalid function name in /nfs/c08/h02/mnt/171249/domains/brewerjwebdesign.com/html/wp-includes/class-walker-comment.php on line 180

    Warning: call_user_func() expects parameter 1 to be a valid callback, function 'srh_comment' not found or invalid function name in /nfs/c08/h02/mnt/171249/domains/brewerjwebdesign.com/html/wp-includes/class-walker-comment.php on line 180

      Warning: call_user_func() expects parameter 1 to be a valid callback, function 'srh_comment' not found or invalid function name in /nfs/c08/h02/mnt/171249/domains/brewerjwebdesign.com/html/wp-includes/class-walker-comment.php on line 180

        Warning: call_user_func() expects parameter 1 to be a valid callback, function 'srh_comment' not found or invalid function name in /nfs/c08/h02/mnt/171249/domains/brewerjwebdesign.com/html/wp-includes/class-walker-comment.php on line 180

    Warning: call_user_func() expects parameter 1 to be a valid callback, function 'srh_comment' not found or invalid function name in /nfs/c08/h02/mnt/171249/domains/brewerjwebdesign.com/html/wp-includes/class-walker-comment.php on line 180

      Warning: call_user_func() expects parameter 1 to be a valid callback, function 'srh_comment' not found or invalid function name in /nfs/c08/h02/mnt/171249/domains/brewerjwebdesign.com/html/wp-includes/class-walker-comment.php on line 180

        Warning: call_user_func() expects parameter 1 to be a valid callback, function 'srh_comment' not found or invalid function name in /nfs/c08/h02/mnt/171249/domains/brewerjwebdesign.com/html/wp-includes/class-walker-comment.php on line 180

    Warning: call_user_func() expects parameter 1 to be a valid callback, function 'srh_comment' not found or invalid function name in /nfs/c08/h02/mnt/171249/domains/brewerjwebdesign.com/html/wp-includes/class-walker-comment.php on line 180

    Warning: call_user_func() expects parameter 1 to be a valid callback, function 'srh_comment' not found or invalid function name in /nfs/c08/h02/mnt/171249/domains/brewerjwebdesign.com/html/wp-includes/class-walker-comment.php on line 180

    Warning: call_user_func() expects parameter 1 to be a valid callback, function 'srh_comment' not found or invalid function name in /nfs/c08/h02/mnt/171249/domains/brewerjwebdesign.com/html/wp-includes/class-walker-comment.php on line 180

      Warning: call_user_func() expects parameter 1 to be a valid callback, function 'srh_comment' not found or invalid function name in /nfs/c08/h02/mnt/171249/domains/brewerjwebdesign.com/html/wp-includes/class-walker-comment.php on line 180

    Warning: call_user_func() expects parameter 1 to be a valid callback, function 'srh_comment' not found or invalid function name in /nfs/c08/h02/mnt/171249/domains/brewerjwebdesign.com/html/wp-includes/class-walker-comment.php on line 180

      Warning: call_user_func() expects parameter 1 to be a valid callback, function 'srh_comment' not found or invalid function name in /nfs/c08/h02/mnt/171249/domains/brewerjwebdesign.com/html/wp-includes/class-walker-comment.php on line 180

    Warning: call_user_func() expects parameter 1 to be a valid callback, function 'srh_comment' not found or invalid function name in /nfs/c08/h02/mnt/171249/domains/brewerjwebdesign.com/html/wp-includes/class-walker-comment.php on line 180

      Warning: call_user_func() expects parameter 1 to be a valid callback, function 'srh_comment' not found or invalid function name in /nfs/c08/h02/mnt/171249/domains/brewerjwebdesign.com/html/wp-includes/class-walker-comment.php on line 180

    Warning: call_user_func() expects parameter 1 to be a valid callback, function 'srh_comment' not found or invalid function name in /nfs/c08/h02/mnt/171249/domains/brewerjwebdesign.com/html/wp-includes/class-walker-comment.php on line 180

      Warning: call_user_func() expects parameter 1 to be a valid callback, function 'srh_comment' not found or invalid function name in /nfs/c08/h02/mnt/171249/domains/brewerjwebdesign.com/html/wp-includes/class-walker-comment.php on line 180

    Warning: call_user_func() expects parameter 1 to be a valid callback, function 'srh_comment' not found or invalid function name in /nfs/c08/h02/mnt/171249/domains/brewerjwebdesign.com/html/wp-includes/class-walker-comment.php on line 180

      Warning: call_user_func() expects parameter 1 to be a valid callback, function 'srh_comment' not found or invalid function name in /nfs/c08/h02/mnt/171249/domains/brewerjwebdesign.com/html/wp-includes/class-walker-comment.php on line 180

    Warning: call_user_func() expects parameter 1 to be a valid callback, function 'srh_comment' not found or invalid function name in /nfs/c08/h02/mnt/171249/domains/brewerjwebdesign.com/html/wp-includes/class-walker-comment.php on line 180

    Warning: call_user_func() expects parameter 1 to be a valid callback, function 'srh_comment' not found or invalid function name in /nfs/c08/h02/mnt/171249/domains/brewerjwebdesign.com/html/wp-includes/class-walker-comment.php on line 180

      Warning: call_user_func() expects parameter 1 to be a valid callback, function 'srh_comment' not found or invalid function name in /nfs/c08/h02/mnt/171249/domains/brewerjwebdesign.com/html/wp-includes/class-walker-comment.php on line 180

        Warning: call_user_func() expects parameter 1 to be a valid callback, function 'srh_comment' not found or invalid function name in /nfs/c08/h02/mnt/171249/domains/brewerjwebdesign.com/html/wp-includes/class-walker-comment.php on line 180

    Warning: call_user_func() expects parameter 1 to be a valid callback, function 'srh_comment' not found or invalid function name in /nfs/c08/h02/mnt/171249/domains/brewerjwebdesign.com/html/wp-includes/class-walker-comment.php on line 180

      Warning: call_user_func() expects parameter 1 to be a valid callback, function 'srh_comment' not found or invalid function name in /nfs/c08/h02/mnt/171249/domains/brewerjwebdesign.com/html/wp-includes/class-walker-comment.php on line 180

    Warning: call_user_func() expects parameter 1 to be a valid callback, function 'srh_comment' not found or invalid function name in /nfs/c08/h02/mnt/171249/domains/brewerjwebdesign.com/html/wp-includes/class-walker-comment.php on line 180

Your feedback