SHOW:
|
|
- or go back to the newest paste.
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 | - | echo $user->roles[0]; |
8 | + | $user_role = $user->roles[0]; |
9 | ||
10 | if ( $user_role == "donating_member" ) { | |
11 | echo "<img='http://example.com/badge.gif' />"; | |
12 | } |