Title: Show random comment?
Last modified: August 19, 2016

---

# Show random comment?

 *  [thinkadrian](https://wordpress.org/support/users/thinkadrian/)
 * (@thinkadrian)
 * [17 years, 5 months ago](https://wordpress.org/support/topic/show-random-comment/)
 * I’ve looked everywhere but can’t find a simple solution.
 * I want to show one random comment anywhere on my site. I’d also would like to
   show the comment author name and link to the post in which the comment resides.
 * [Post list](http://wp.darathor.com/mes-plugins-maison/post-lister/) manages to
   show the author and link, but not the comment itself. It’s also has to be in 
   the dynamic sidebar.
 * Some SQL requests could dig up the data I need, but all I find are the SQL request
   code, but not to initiate an SQL request using PHP.
 * Any clues? Thank you in beforehand

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [gercheq](https://wordpress.org/support/users/gercheq/)
 * (@gercheq)
 * [17 years, 4 months ago](https://wordpress.org/support/topic/show-random-comment/#post-953707)
 * I am also looking for a plugin which can handle this.
 * I just want to display comments of a page randomly in anywhere in my page.
 *  [security_man](https://wordpress.org/support/users/security_man/)
 * (@security_man)
 * [16 years, 10 months ago](https://wordpress.org/support/topic/show-random-comment/#post-953756)
 * in wp-includes.php around line 216 comment out the following
    `$orderby = 'comment_date_gmt';//
   Hard code for now`
 * IF your sql version allows for the RAND argument then itll work when you pass
   $orderby=rand in the get_comments function.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Show random comment?’ is closed to new replies.

## Tags

 * [comment](https://wordpress.org/support/topic-tag/comment/)
 * [Comments](https://wordpress.org/support/topic-tag/comments/)

 * 2 replies
 * 3 participants
 * Last reply from: [security_man](https://wordpress.org/support/users/security_man/)
 * Last activity: [16 years, 10 months ago](https://wordpress.org/support/topic/show-random-comment/#post-953756)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
