Title: Comments in Main Thread
Last modified: August 19, 2016

---

# Comments in Main Thread

 *  [blurredv](https://wordpress.org/support/users/blurredv/)
 * (@blurredv)
 * [15 years, 5 months ago](https://wordpress.org/support/topic/comments-in-main-thread/)
 * Hi all,
 * I’m trying to find if it’s possible to change the way comments are viewed on 
   my wp site. I’d rather see a list of comments under the posts in my main thread
   then have people navigate away to a specific comments page…
 * Is this possible and if so, can anyone help out with the coding that would be
   involved?
 * Simplicity is the key to my site and I’d like the comments to elegantly sit under
   the post itself…
 * Cheers,
    JB

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

 *  [David Gard](https://wordpress.org/support/users/duck_boy/)
 * (@duck_boy)
 * [15 years, 5 months ago](https://wordpress.org/support/topic/comments-in-main-thread/#post-1828952)
 * Yes it is possible, and quite easy.
 * Comment count –
    `<?php comments_popup_link('No Comments', '1 Comment', '% Comments');?
   >`
 * Show comments – see the [codex here](http://codex.wordpress.org/Function_Reference/get_comment)
   for more information
    `<?php get_comment($id, $output); ?>`
 *  Thread Starter [blurredv](https://wordpress.org/support/users/blurredv/)
 * (@blurredv)
 * [15 years, 5 months ago](https://wordpress.org/support/topic/comments-in-main-thread/#post-1828958)
 * Thanks duck_boy!
 * So do I just add this code to the ‘comments.php’ page or do I need to replace
   code? Not 100%.
 * Cheers,
    JB
 *  [David Gard](https://wordpress.org/support/users/duck_boy/)
 * (@duck_boy)
 * [15 years, 5 months ago](https://wordpress.org/support/topic/comments-in-main-thread/#post-1828961)
 * If you want your comments displayed on each post you would need to add it to 
   single.php, inside The Loop (look it up if you are not sure what The Loop is).
   You will need to amend slightly so that the `$id` and `$output` variables hold
   the correct information.
 * You will then need to add a little code to display what you want. For example,
   the following would display the Author and then the Comment and should hopefully
   get you going –
 *     ```
       $comments_ids = $wpdb->get_results("SELECT comment_ID FROM $wpdb->comments WHERE comment_post_ID='".the_id());
   
       foreach($comment_ids as $comment_id){
       	<?php $comment = get_comment($comment_id); ?>
       	<h3>Comment by <?php echo $comment->comment_author; ?></h3>
       	<p><?php echo $comment->comment_content; ?></p>
       ```
   
 * }`
 *  [Root](https://wordpress.org/support/users/root/)
 * (@root)
 * [15 years, 5 months ago](https://wordpress.org/support/topic/comments-in-main-thread/#post-1828980)
 * Cant the post id be extracted without another db query ?

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

The topic ‘Comments in Main Thread’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 4 replies
 * 3 participants
 * Last reply from: [Root](https://wordpress.org/support/users/root/)
 * Last activity: [15 years, 5 months ago](https://wordpress.org/support/topic/comments-in-main-thread/#post-1828980)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
