Skip to:
Content
Pages
Categories
Search
Top
Bottom

Get User's WordPress Role


  • tommysvr
    Participant

    @tommysvr

    Hi all,

    I have a little issue since bbPress switched to its own user roles. I was previously showing an image under a users avatar based on this role (ie admin, subscriber).

    With the new method, it just shows the bbPress role of participant or key master. This is a problem because my registration forms put the user in WordPress role.

    My question is this: is there a way to output the WordPress role rather than the bbPress role? Here is what I’m using at the moment:

    $role = bbp_get_user_display_role(bbp_get_reply_author_id($reply_id));

    <div class="bbp-reply-author <?php echo $role; ?>">

    Any help is greatly appreciated!

Viewing 1 replies (of 1 total)

  • tommysvr
    Participant

    @tommysvr

    Alternatively, if I could show a user_meta field for each post, that would work too. I’m struggling with the code below too.

    global $current_user; get_currentuserinfo(); get_user_meta($current_user->ID, 'membership', true);

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.
Skip to toolbar