[wp-hackers] function to show total comments by user

Simon Blackbourn piemanek at gmail.com
Sun Jan 16 20:21:38 UTC 2011


> Now my questions are, have I reinvented the wheel? While I wasn't able to
> find a function within WordPress that does exactly this, maybe you can point
> me to something I've missed in my research...
>
>

This should work (replace the 1 with your required user ID):

$userID = 1;
echo get_comments( array( 'user_id' => $userID, 'count' => true ) );


More information about the wp-hackers mailing list