Exclude admin from the top commenters list [duplicate]
Assuming the comment_author is a User ID, try: if(user_can($result->comment_author,’manage_options’)){ $output .= “<li>”.(($result->comment_author_url) ? “<a href=””.$result->comment_author_url.””>” : “”).$result->comment_author.(($result->comment_author_url) ? “</a>” : “”).” (“.$result->comments_count.”)</li>”; } If not, one can use get_comment, and select the comment_ID in the SQL statement. You can then use the object returned to grab the user ID of the comments author, and do … Read more