Title: Threaded comments/Replying to comments
Last modified: August 19, 2016

---

# Threaded comments/Replying to comments

 *  [shibonari](https://wordpress.org/support/users/shibonari/)
 * (@shibonari)
 * [16 years, 9 months ago](https://wordpress.org/support/topic/threaded-commentsreplying-to-comments/)
 * Hi 🙂
 * I am currently using the default Kubrik theme.
 * I added `<?php $withcomments = 1; ?>` and `<?php comments_template( 'comments.
   php' ); ?>` to the index.php
 * I can see the post and its comments in the index page.
 * Usually, when replying to threaded comments, the comment form will automatically
   change its location to just below the comment you are trying to reply to.
 * However, when I click “reply” the page just refresh and brought me to the following
   address: [http://localhost/wp/?replytocom=9#respond](http://localhost/wp/?replytocom=9#respond)
 * My wordpress default path is located at /wp and I didn’t changed the url rewrite
   settings.
 * Any help?
 * Thanks in advance 🙂

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

 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [16 years, 9 months ago](https://wordpress.org/support/topic/threaded-commentsreplying-to-comments/#post-1194796)
 * > I added <?php $withcomments = 1; ?> and <?php comments_template( ‘comments.
   > php’ ); ?> to the index.php
 * Why?
 *  [Mark / t31os](https://wordpress.org/support/users/t31os_/)
 * (@t31os_)
 * [16 years, 9 months ago](https://wordpress.org/support/topic/threaded-commentsreplying-to-comments/#post-1194861)
 * WordPress will not show comments on the index by default, you need the $withcomments
   = 1 in order to obtain that functionality..
 * Clicking reply links only updates particular data so that the comment is registered
   as reply-to type comment (i think literally just a few input values are updated).
   The link it pointed you to is just the comment form’s anchor…
 * Is there something missing from that URL, because otherwise it looks perfectly
   normal…
 * Do comments end up in the right place?
 * Need a few more details..
 *  Thread Starter [shibonari](https://wordpress.org/support/users/shibonari/)
 * (@shibonari)
 * [16 years, 9 months ago](https://wordpress.org/support/topic/threaded-commentsreplying-to-comments/#post-1194963)
 * [@esmi](https://wordpress.org/support/users/esmi/)
    So that I can list all the
   comments of the posts in the index using <?php comments_template( ‘comments.php’);?
   > 🙂
 * [@t31os](https://wordpress.org/support/users/t31os/)
    I did enable $withcomments
   = 1.
 * The comments end up in the right place, they are showing up fine, and the reply
   box is there too. I can even reply normally, although I end up in the post’s 
   single.php instead of staying at index.php
 * If it is possible, try modifying the default kubrick index.php and just add $
   withcomments = 1 and <?php comments_template( ‘comments.php’ ); ?> in the loop
   in case it’s hard to understand 😛
 * Thanks for the replies!
 *  [Mark / t31os](https://wordpress.org/support/users/t31os_/)
 * (@t31os_)
 * [16 years, 9 months ago](https://wordpress.org/support/topic/threaded-commentsreplying-to-comments/#post-1195091)
 * I understand, i mentioned the withcomments variable for esmi.
 * I see the problem, after a comment is submitted you’re redirected to the single
   entry URL. I’ve no idea how to change that unfortunately.
 * I’ve no doubt there is a simple way, i’ve not dealt with the problem before though,
   so i can’t offer anything to help….
 * Try the wp-hackers mailing list…

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

The topic ‘Threaded comments/Replying to comments’ is closed to new replies.

## Tags

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

 * 4 replies
 * 3 participants
 * Last reply from: [Mark / t31os](https://wordpress.org/support/users/t31os_/)
 * Last activity: [16 years, 9 months ago](https://wordpress.org/support/topic/threaded-commentsreplying-to-comments/#post-1195091)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
