WordPress comment styling for specific user levels


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  1. <?php if (!empty($comment->user_id) && get_userdata($comment->user_id)->wp_user_level > '1') {
  2. echo "ADMIN";
  3. } else {
  4. echo "REGULAR FOLK";
  5. }?>

Report this snippet


Comments


You need to login to view comments.