Comment Reply Link not working
-
So I’m finally taking a crack at really getting down and building my own theme, but I seem to have hit a wall.
I am working on my comments.php file and for the life of me cannot get a comment reply link to even appear. The site isn’t online so I’ll just post my code.
<?php if ($comments) : // there are comments ?> <section id="comments"> <h1><?php comments_number('0 Comments', 'One Comment', '% Comments' ); ?></h1> <?php $i = 1; ?> <?php foreach ($comments as $comment) : ?> <article <?php echo $oddcomment; ?>id="comment-<?php comment_ID(); ?>"> <?php echo get_avatar( $comment, 100 ); ?> <header> <?php get_author_posts_url() ?> <h1><cite><?php comment_author_link(); ?></cite></h1> <a href="#comment-<?php comment_ID(); ?>" title="Permalink for this comment" class="comment-date"><?php comment_date('F jS, Y'); ?> at <?php comment_time(); ?> </a><?php edit_comment_link('Edit',' ',' '); ?> <?php if ($comment->comment_approved == '0') : ?> <p>Your comment is awaiting moderation.</p> <?php endif; ?> </header> <section> <?php comment_text(); ?> <div class="comment-reply"> <?php comment_reply_link() ?> </div><!-- end div.comment-reply --> </section> <div class="commentnumber"><?php echo $i; ?></div> </article> <?php $i++; ?> <?php $oddcomment = (empty($oddcomment)) ? 'class="alt" ' : ''; // alternating comments ?> <?php endforeach; ?> </section><!-- end section#comments -->
I have tried
<?php comment_reply_link(); ?>
,<?php get_comment_reply_link(); ?>
,<?php comment_reply_link( array_merge( $args, array( 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>
. And none of these will output any bit of source code.Can anyone enlighten me? I’ve become quite frustrated with this.
Thanks in advance!
- The topic ‘Comment Reply Link not working’ is closed to new replies.