![]() |
|
||||||
|
|
Thread Tools | Display Modes |
|
#4
|
|||
|
|||
|
1. First thing you will want to do is create a backup your comments.php file.
2. Locate the comments.php file. 3. Locate the code that starts the comment loop. It will look something like this: <?php if ( $comments ) : ?> 4. Place this code immediately above the code in Step 3: <?php $i = 0; ?> 5. Now locate the code that looks like this: <?php foreach ($comments as $comment) : ?> 6. Placed this code immediately below the code in Step 5: <?php $i++; ?> 7. Now use this code where you want to display your comment numbers: <span class="count"> <?php echo $i; ?> </span> 8. Click Save. 9. Now go to your stylesheet (style.css) and place this code anywhere on the stylesheet (probably best placed in the comments section): .count { float:right; padding: 10px; font-size:18px; color:#000000; } I couldn't find this below code in comments.php. Code:
<?php foreach ($comments as $comment) : ?> |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Numbering Comments | ilikeitfrantic | General Discussion | 4 | 09-02-2009 10:36 AM |
| V 4.0: Numbering Individual Comments on a Post | Kailani | General Discussion | 1 | 08-06-2009 11:46 PM |
© Copyright 2012 Copyblogger Media LLC · StudioPress™ is a trademark of Copyblogger Media LLC
Privacy Policy | Refund Policy | Terms of Service | Affiliate Program | Contact Us