I'm using a callback function to output the comments on my site, but I'm having problems with the reply script. I always get a full page reload.
I'm calling the script in the same place as all my other scripts like this:
if ( is_singular() ) wp_enqueue_script( 'comment-reply' );
The script is loaded correctly.
I'm listing my comments like this:
$a_args = array( 'type' => 'comment', 'callback' => 'custom_comments', ); wp_list_comments( $a_args );
Here's the code that generates the reply link:
$a_args = array( 'depth' => $depth, 'max_depth' => $args['max_depth'], 'before' => '<div class="reply">', 'after' => '</div>', ); $s_reply_link = comment_reply_link(array_merge( $args, $a_args )); echo $s_reply_link;
Haven't customized the comment form yet, I just call it like this:
<?php comment_form(); ?>
The script works when I call the
wp_list_comments function without the callback. The output inside the '.reply' div is the same in both cases.
[ Please do not bump, that's not permitted here. ]