Title: is there a get_comment() function?
Last modified: August 18, 2016

---

# is there a get_comment() function?

 *  [jkoontz](https://wordpress.org/support/users/jkoontz/)
 * (@jkoontz)
 * [20 years, 4 months ago](https://wordpress.org/support/topic/is-there-a-get_comment-function/)
 * Is there a get_comment() function similar to get_post()? The codex is rather 
   bleak with comment info and I can’t find anything in the source code. Maybe I’m
   just missing it?

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

 *  [Joshua Sigar](https://wordpress.org/support/users/alphaoide/)
 * (@alphaoide)
 * [20 years, 4 months ago](https://wordpress.org/support/topic/is-there-a-get_comment-function/#post-309263)
 * There’s no get_comment.
 * Here’s how WP fetches comments. (File: comment-functions.php; function: comments_template.)
 * ` $comments = $wpdb->get_results("SELECT * FROM $wpdb->comments WHERE comment_post_ID
   = '$post->ID' AND ( comment_approved = '1' OR ( comment_author = '$author_db'
   AND comment_author_email = '$email_db' AND comment_approved = '0' ) ) ORDER BY
   comment_date");`
 *  Thread Starter [jkoontz](https://wordpress.org/support/users/jkoontz/)
 * (@jkoontz)
 * [20 years, 4 months ago](https://wordpress.org/support/topic/is-there-a-get_comment-function/#post-309288)
 * Thanks. That’s what I thought I had to do. Just hoping for an easier solution.
 *  [veronique-m](https://wordpress.org/support/users/veronique-m/)
 * (@veronique-m)
 * [19 years, 10 months ago](https://wordpress.org/support/topic/is-there-a-get_comment-function/#post-309957)
 * there is a get_comment function

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

The topic ‘is there a get_comment() function?’ is closed to new replies.

 * 3 replies
 * 3 participants
 * Last reply from: [veronique-m](https://wordpress.org/support/users/veronique-m/)
 * Last activity: [19 years, 10 months ago](https://wordpress.org/support/topic/is-there-a-get_comment-function/#post-309957)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
