Support » Themes and Templates » comment id – I’m stumped!

  • Resolved rigdonia

    (@rigdonia)


    The comment numbering system on the new theme gets to 9 and then starts over with 0,1,2 etc. I am sure it is some easy peasy thing but still I remain clueless. Here’s the code that I believe to be pertinent:

    <?php if ( $comments ) : ?>
    <ol id="commentlist">

    <?php foreach ($comments as $comment) : ?>
    <li id="comment-<?php comment_ID() ?>"> <?php comment_text() ?>
    <p><cite><?php comment_type(__('Comment'), __('Trackback'), __('Pingback')); ?> <?php _e('by'); ?> <?php comment_author_link() ?> — <?php comment_date() ?> @ <a href="#comment-<?php comment_ID() ?>"><?php comment_time() ?></a></cite> <?php edit_comment_link(__("Edit This"), ' |'); ?></p>
    </li>

    <?php endforeach; ?>

    </ol>

    You can see it in action at shabbyelements.com/blog
    Appreciate any input! 🙂

Viewing 4 replies - 1 through 4 (of 4 total)
  • maerk

    (@maerk)

    I think what’s probably happening is that the browser is cutting off the second digit when it displays them.

    Try adding

    #commentlist li { margin-left: 10px; }

    to your CSS

    You can play around with the number to get it to something you’re pleased with.

    rigdonia

    (@rigdonia)

    Thanks I will!

    rigdonia

    (@rigdonia)

    Wahoo it worked! Thanks! Blushing. Hehehehe. I was so sure it was in the php. Sigh.

    maerk

    (@maerk)

    It did cut the first digit off very neatly, so it didn’t appear to be a CSS thing. It wouldn’t occur to you unless you’d seen it done before 🙂

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘comment id – I’m stumped!’ is closed to new replies.