/ Published in: PHP
                    
                                        
To do so, simply open your comments.php file and replace your comments loop by this one :
                
                            
                                Expand |
                                Embed | Plain Text
                            
                        
                        Copy this code and paste it in your HTML
<ol id="commentlist">
<?php foreach ($comments as $comment) : ?>
<?php // The extra stuff to get commenter's role
$user_id = $comment->user_id;
?>
<li class="<?php echo $role; ?>">
<p>By <?php comment_author_link() ?> - <?php comment_date() ?></p>
<?php comment_text() ?>
</li>
<?php endforeach; ?>
</ol>
Once done, open yout style.css file and paste the following:
#commentlist li { border:2px solid white; } /* not logged or subscriber */
#commentlist li.administrator { border:2px solid red } /* blog admin */
#commentlist li.editor { border:2px solid blue } /* editor */
URL: http://www.wprecipes.com/wordpress-how-to-style-comments-of-every-roles
Comments
 Subscribe to comments
                    Subscribe to comments
                
                