WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] comment id - I'm stumped! (5 posts)

  1. rigdonia
    Member
    Posted 8 years ago #

    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! :-)

  2. maerk
    Member
    Posted 8 years ago #

    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.

  3. rigdonia
    Member
    Posted 8 years ago #

    Thanks I will!

  4. rigdonia
    Member
    Posted 8 years ago #

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

  5. maerk
    Member
    Posted 8 years ago #

    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 :)

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags