Comment Reply Link Reloading Page Instead of Moving Comment Form

In my comments.php, I loop through the comments like this:

if (have_comments()) : ?
    ol class=post-comments
        ?php
        wp_list_comments(array(
            'style'       = 'ol',
            'short_ping'  = true,
            'callback' = 'better_comments'
        ));
        ?
    /ol
?php
endif;

where better_comments() is defined as follows:

function better_comments($comment, $args, $depth)
{
?
    li class=comment byuser comment-author-admin bypostauthor even thread-even depth-1
        div class=comment-body
            phello/p
            p
                ?php comment_reply_link(array_merge($args, array('depth' = $depth, 'max_depth' = $args['max_depth']))) ?
            /p
        /div
    /li
?php
}

The comment_reply_link call gives me a reply button on my comments, but clicking it reloads the page, and does not move the comments form like it is supposed to. How can I fix this?

Topic php comments Wordpress

Category Web

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.