Title: Count User Comments
Last modified: August 20, 2016

---

# Count User Comments

 *  [tlw22](https://wordpress.org/support/users/tlw22/)
 * (@tlw22)
 * [14 years, 12 months ago](https://wordpress.org/support/topic/count-user-comments/)
 * Hi,
 * Is there anyway to count the amount of comments posted by a user and then display
   an image next to their name once they have reached a set amount of comments. 
   For instance once a registered user has reached 5 posts it displays a badge next
   to their name. Example below:
    [Example!](http://b.dznz.org/comments)
 * I have a fairly vague idea on how to do this, however unfortunately, it doesn’t
   work as I am unsure what the parameter (?) would be for this.
 * My ‘rough’ code:
 *     ```
       <?php if ( unknownCode(1) > 5 ) : ?>
       			<img src="images/image.php" />
       			<?php else: ?>
       			<?php author_comment_count(); ?>
       			<?php endif; ?>
       ```
   
 * I’m the biggest PHP noob going. Any help would be great, thanks!

The topic ‘Count User Comments’ is closed to new replies.

 * 0 replies
 * 1 participant
 * Last reply from: [tlw22](https://wordpress.org/support/users/tlw22/)
 * Last activity: [14 years, 12 months ago](https://wordpress.org/support/topic/count-user-comments/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
