Guest User

Untitled

a guest
Jul 31st, 2012
172
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /**
  2. * Try something like this to get a users role and check if the role is your premium member role, if it is  
  3. * then display the badge. Use this inside loop-single-reply.php inside your theme. NOTE: I haven't tested  
  4. * this yet.
  5. */
  6.  
  7. $user = new WP_User( bbp_get_reply_author_id ( bbp_get_reply_id() ) );
  8. $user_role = $user->roles[0];
  9.  
  10. if ( $user_role == "donating_member" ) {
  11.     echo "<img='http://example.com/badge.gif' />";
  12. }
RAW Paste Data