• 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)
  • 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

    (@jkoontz)

    Thanks. That’s what I thought I had to do. Just hoping for an easier solution.

    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.