Title: comment_reply_link() not working
Last modified: August 21, 2016

---

# comment_reply_link() not working

 *  Resolved [Luke](https://wordpress.org/support/users/lukejanicke/)
 * (@lukejanicke)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/comment_reply_link-not-working-2/)
 * I am calling `comment_reply_link()` in my custom callback function for `wp_list_comment()`.
 * It isn’t working… at all.
 * `<?php comment_reply_link( array( 'before' => '<li class="reply">', 'after' =
   > '</li>' ) ); ?>`
 * At this stage, I’m not using `comment-reply.js` to move the comment form. I’m
   just slowing building up from scratch my theme (a learning exercise). I want 
   to implement threaded comments and the first step is to make the reply link work.
 * Is that JavaScript actually required for the reply link to work?
    Why is there
   no output from this function in my code?

Viewing 1 replies (of 1 total)

 *  Thread Starter [Luke](https://wordpress.org/support/users/lukejanicke/)
 * (@lukejanicke)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/comment_reply_link-not-working-2/#post-4546978)
 * Thanks to [fwoan](http://profiles.wordpress.org/fwoan/)’s comment [here](http://wordpress.org/support/topic/comment_reply_link-generates-no-output?replies=13#post-1477423)…
 * I copied the code [here](http://codex.wordpress.org/Template_Tags/wp_list_comments#Comments_Only_With_A_Custom_Comment_Display).
 * Which means I added the following bits to my callback function:
 *     ```
       function my_list_comments( $comment, $args, $depth ) {
           $GLOBALS['comment'] = $comment;
           extract($args, EXTR_SKIP); ?>
           …
           <?php comment_reply_link( array_merge( $args, array('add_below' => $add_below, 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>
           …
       <?php }
       ```
   
 * Initially, there was nothing to tell me I needed those parts.
 * It all works now!

Viewing 1 replies (of 1 total)

The topic ‘comment_reply_link() not working’ is closed to new replies.

## Tags

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

 * In: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
 * 1 reply
 * 1 participant
 * Last reply from: [Luke](https://wordpress.org/support/users/lukejanicke/)
 * Last activity: [12 years, 3 months ago](https://wordpress.org/support/topic/comment_reply_link-not-working-2/#post-4546978)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
