• Hello Everyone,

    I’m looking for a plugin that will give mimic an ordered list, so I can have my comments numbered (1, 2, 3 etc). I want to use divs instead of the ordered list, and I can’t find anything in the wiki that will accomodate this. Does anyone have any suggestions, etc?

Viewing 5 replies - 1 through 5 (of 5 total)
  • No need for a plugin. Edit your comments.php and add this line at the top (just below return; endif;)

    $commentcount=1;

    Then in your comments list, where you want to display the number, just add:

    <?php echo $commentcount++; ?>

    Thread Starter neczy

    (@neczy)

    Sweet, that did the trick, thanks.

    You could have also done:

    <ol>
    <li>A comment</li>
    <li>Another comment</li>
    <li>Yet another comment</li>
    </ol>

    Which produces:

    1. A comment
    2. Another comment
    3. Yet another comment

    [edit] Whoops, missed how you wanted to do div’s instead of a ordered list. However, you coulda still done this and controlled the look of your li’s instead of using div’s.

    Example: click here

    My comments are encased in li’s, not div’s. [/edit]

    I did not succeed to implement this solution.
    Though, I am not a programmer.
    Digging through the forum, I found this thread with a more simple solution that worked for me.

    .commentlist li {
    margin: 15px 0 3px;
    padding: 5px 10px 3px;
    <strong>list-style: decimal;</strong>
    }

    Comment numbering with stylesheet

    Mmm….

    list-style: decimal;

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Comment Number’ is closed to new replies.