Posted By

laurentzziu on 11/09/10


Tagged

wordpress admin comments


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

hariom


Wordpress Comments Styling


 / Published in: PHP
 

  1. <ol id="commentlist">
  2. <?php foreach ($comments as $comment) : ?>
  3. <?php // The extra stuff to get commenter's role
  4. $user_id = $comment->user_id;
  5. $role = ( isset( $roles[$user_id] ) ? $roles[$user_id] : '' );
  6. ?>
  7. <li class="<?php echo $role; ?>">
  8. <p>By <?php comment_author_link() ?> - <?php comment_date() ?></p>
  9. <?php comment_text() ?>
  10. </li>
  11. <?php endforeach; ?>
  12. </ol>
  13.  
  14. #commentlist li { border:2px solid white; } /* not logged or subscriber */
  15. #commentlist li.administrator { border:2px solid red } /* blog admin */
  16. #commentlist li.editor { border:2px solid blue } /* editor */

Report this snippet  

You need to login to post a comment.