Support » Themes and Templates » [Resolved] Comment number skips first comment?

[Resolved] Comment number skips first comment?

  • Seems like long time, no post…about code issues, anyway.

    I know right off the bat that my problem most likely stems from cobbling together bits and pieces of code, I just don’t quite know how to fix it.

    I’ve started using a theme that didn’t include a permalink to each comment, so I’m trying to put in the code to add the permalink and have succeeded…sort of. The comment number, and thus the permalink, always skips the first comment. So for example, if there are three comments, only the last two comments are getting numbered, 1 and 2 respectively. You can see an example of what’s going on at this post on my site, which is work safe.

    Here’s the code I’ve used:

    <?php foreach ($comments as $comment) : ?>
    <div id="metacoment">
    <div id="usuario">
    <a href="#comment-<?php comment_ID(); ?>" class="comment_no" title="Permanent Link to this Comment"><?php echo $commentcount++; ?></a>
    <?php comment_type(__('Comment'), __('Trackback'), __('Pingback')); ?> <?php _e('by'); ?> <b><?php comment_author_link() ?></b>
    <p class="tiempo"><?php comment_date('l') ?>, <?php comment_date('F') ?> <?php comment_date('j') ?>, <?php comment_date('Y') ?> at <?php comment_time() ?>

    (I know some is in Spanish, that’s how it came with the theme.)

    Can anyone help?

    Sorry my post here is a mess, not sure what I’m doing wrong. 🙁

Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Resolved] Comment number skips first comment?’ is closed to new replies.