Viewing 3 replies - 1 through 3 (of 3 total)
  • What you should probably do is create a counter variable.

    I use the default theme as example, but you should get the idea.

    In wp-content/themes/default, you should edit the file comments.php.
    Right above the comments loop, visible with foreach ($comments as $comment), remove the ol, so it won’t be a list, and define the counter in php:
    <?php $comment_counter = 1; ?>

    Now at the start of your comment, use something like

    <?php echo "Comment number $comment_counter"; ?>

    and after that, increase the comment number by one:
    <?php $comment_counter = $comment_counter + 1; ?>

    Really simple programming, actually.

    Don’t forget to remove all the ol and li tags, and closing tags.

    using lists (ordered list, <ol>) is the easiest way to get your comments numbered. You have in your stylesheet:
    .commentlist li {
    margin: 15px 0 3px;
    padding: 5px 10px 3px;
    list-style: none;
    }

    That last line, list-style, is making the comments appear with no list bullet (that is, no number). If you remove that line, it’ll make the numbering show up, so you can see if that’s what you’d like.

    Thread Starter imlech

    (@imlech)

    @lyklev , thank you so much.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘1.comment , 2.comment ??’ is closed to new replies.