The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End functions question on code dealing with bbpress forums?

  • This topic is empty.
Viewing 1 post (of 1 total)
  • Author
  • #188675

    i want to only display user role on keymaster and moderators users.

    I dont want every participant to have the role shown , only the keymaster and moderators are important enough to me to show their role next to their avatar. The following function code i found, and used but it has some issues:

    function role_show () {
    $displayed_user = bbp_get_reply_author_id() ;
    $role = bbp_get_user_role( $displayed_user);
    if ( bbp_is_user_keymaster($displayed_user) ||$role == 'bbp_moderator')  $args['show_role'] = true ;
    else $args['show_role'] = false ;
    return $args ;
    add_filter ('bbp_before_get_reply_author_link_parse_args', 'role_show' )

    Code Issues:
    On the Forums topic post lists, This code also removes the avatar from showing in the same section as the “last post by” . And it removes the “last post by” name in this same section. How can I fix this ?

Viewing 1 post (of 1 total)
  • The forum ‘Back End’ is closed to new topics and replies.