Title: Numbering Comments &#8211; Not working
Last modified: August 20, 2016

---

# Numbering Comments – Not working

 *  [filmmakerdream](https://wordpress.org/support/users/filmmakerdream/)
 * (@filmmakerdream)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/numbering-comments-not-working/)
 * I just created a new theme for my website and I’m having one problem with the
   comments. I have written in the comments.php file to have the comments numbered.
   In other words, when you look at the comments on my website, you should see a
   number by each comments, however it’s not showing. I do have the code implemented.
   I wonder if there is a glitch. Here is the webpage – [http://cochlearimplantonline.com/site/?p=2711](http://cochlearimplantonline.com/site/?p=2711)
 * Thank you!

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

 *  [Michael](https://wordpress.org/support/users/alchymyth/)
 * (@alchymyth)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/numbering-comments-not-working/#post-2120301)
 * your comment list has the surrounding `ol` tag but no `li` tags.
 * [http://www.w3schools.com/html/html_lists.asp](http://www.w3schools.com/html/html_lists.asp)
   
   [http://www.w3schools.com/css/css_list.asp](http://www.w3schools.com/css/css_list.asp)
 *  Thread Starter [filmmakerdream](https://wordpress.org/support/users/filmmakerdream/)
 * (@filmmakerdream)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/numbering-comments-not-working/#post-2120309)
 * Thank you for your help, but I actually do have the surrounding li tags. Here
   is part of my coding:
 *     ```
       <ol id="commentlist">
   
       <h4><?php foreach ($comments as $comment) : ?></h4>
       	<h3>
       	  <li id="comment-<?php comment_ID() ?>">
       	</h3>
       	<h4><?php echo get_avatar( $comment, 32 ); ?><?php comment_text() ?></h4>
       	<h4><strong><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"), ' |'); ?></strong></h4>
       	</li>
   
       <?php endforeach; ?>
   
       </ol>
       ```
   
 * I just wonder if I did something to revert it?
 *  [Michael](https://wordpress.org/support/users/alchymyth/)
 * (@alchymyth)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/numbering-comments-not-working/#post-2120487)
 * the code is no valid html – try to get rid of some of the `h` tags;
 * cleaned up: for instance:
 *     ```
       <ol id="commentlist">
   
       <?php foreach ($comments as $comment) : ?>
   
       	  <li id="comment-<?php comment_ID(); ?>">
   
       	<h4><?php echo get_avatar( $comment, 32 ); ?><?php comment_text(); ?></h4>
       	<h4><strong><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"), ' |'); ?></strong></h4>
       	</li>
   
       <?php endforeach; ?>
   
       </ol>
       ```
   
 * and your output in the browser has a lot of html table tags as well; which might
   break the output of the list style items.
 * try to fix the validation errors:
    [http://validator.w3.org/check?uri=http%3A%2F%2Fcochlearimplantonline.com%2Fsite%2F%3Fp%3D2711&charset=%28detect+automatically%29&doctype=Inline&group=0](http://validator.w3.org/check?uri=http%3A%2F%2Fcochlearimplantonline.com%2Fsite%2F%3Fp%3D2711&charset=%28detect+automatically%29&doctype=Inline&group=0)
 * [http://codex.wordpress.org/Validating_a_Website](http://codex.wordpress.org/Validating_a_Website)
 *  Thread Starter [filmmakerdream](https://wordpress.org/support/users/filmmakerdream/)
 * (@filmmakerdream)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/numbering-comments-not-working/#post-2120515)
 * Thank you for your help. I tried your cleaned up code and it didn’t work. I’ve
   used tables in other designs in the past and the comment numbering always worked.
 * To be honest, I’m not very knowledgeable about html coding. I’m more of a beginner.

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

The topic ‘Numbering Comments – Not working’ is closed to new replies.

## Tags

 * [comment](https://wordpress.org/support/topic-tag/comment/)
 * [Comments](https://wordpress.org/support/topic-tag/comments/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 4 replies
 * 2 participants
 * Last reply from: [filmmakerdream](https://wordpress.org/support/users/filmmakerdream/)
 * Last activity: [14 years, 11 months ago](https://wordpress.org/support/topic/numbering-comments-not-working/#post-2120515)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
