WordPress Comment Reply Links never show

I am developing a WP theme and want to use a custom comment template for the most part everything is working fine, but no matter what I try to do I am unable to get the comment reply link to show.

In admin>discussion> Settings
enter image description here

In Functions Php I create my

Custom Theme Comments Function

function mytheme_comment($comment, $args, $depth) {

    $GLOBALS['comment'] = $comment;

    extract($args, EXTR_SKIP);
    $depth = 2;
    $max_depth = 2;

    if ( 'div' == $args['style'] ) {
        $tag = 'div';
        $add_below = 'comment';
    } else {
        $tag = 'li';
        $add_below = 'div-comment';
    }
    ?>
    <<?php echo $tag ?>
    <?php comment_class( 'comment__container' ) ?> id="comment-<?php comment_ID() ?>" >


    
<?php if ( 'div' != $args['style'] ) : ?>
" class="comment__body">
<?php if ( $comment->comment_approved == '0' ) : ?> <p class="comment__awaiting-moderation"><?php echo 'Your comment is awaiting moderation.'; ?> </p> <br /> <?php endif; ?>
<?php if ( 'div' != $args['style'] ) : ?> </div> <?php endif; ?> <?php } ?>

Then In Comments Php I have comment form and wp_list_comments with the callback set to my custom comment function

COMMENTS.php

        <?php
    global $current_user;
    get_currentuserinfo();
    $avatar_url = get_avatar_url( $current_user->ID, 50 );

        comment_form(array(
            'id_form'      => 'comment-form',
            'id_submit'    => 'submit',
            'title_reply_to'    => 'Reply',
            'title_reply'       => 'Reply',
            'label_submit' => 'Join The Conversation',

            'comment_field' =>  '
' . _x( 'Comment', 'noun' ) . '' . '
', 'comment_notes_before' => '', 'comment_notes_after' => '', )); ?> <ul class="comments__list"> <?php wp_list_comments( array( 'type' => 'comment', 'max-depth' => 2, 'reply_text' => 'Reply', 'callback' => 'mytheme_comment', // functions/mytheme_comments.php 'avatar_size' => 50, ) ); ?> </ul>

And finally in my single.php I call the comments

    <?php comments_template( ); ?>

After much searching , I cannot figure it out anyone that can give me a hand it would be much appreciated, thank you

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s