Open comments.php and find the following line:
<?php foreach ($comments as $comment) : ?>
Just above this line, initialize a counter variable:
<?php $i = 0; ?>
Just after this line, increment the counter:
<?php $i++; ?>
So, your code will look like this
<?php $i = 0; ?>
<?php foreach ($comments as $comment) : ?>
<?php $i++; ?>
Now, you just have to echo the $i variable to get the number of the current comment. Paste this code anywhere on your comments loop:
<?php echo $i; ?>
Your comments are now numbered!
Feel free to ask Help !
Related posts:



