Ranking displayed in bbPress forums for each topic author?
-
HI! myCred looks like it’s exactly what I’m looking for! I just have one question.
How can I display a user’s ranking under their avatar in bbPress forums?
For example – I’m currently using BP Groups Control plugin so I can assign an identifying group for each user and then use this function to display that under the avatar in the forums:
/* 3 Display User identifying group role on forum topic replies*/ add_action( 'bbp_theme_after_reply_author_details', 'mm_get_the_user_role_name_reply' ); function mm_get_the_user_role_name_reply( ) { global $bp; $my_post_id = get_userdata( bbp_get_reply_author( bbp_get_reply_id() ) ); $user_id = get_post_field( 'post_author', $my_post_id ); if ( $group_id = get_usermeta( $user_id, 'bpgc_identifying' ) ) { $identifying_group = new BP_Groups_Group( $group_id ); echo '<div class="bbp-author-identifying-role id-' . sanitize_title($identifying_group->name) . '">', $identifying_group->name, '</div>' ; } }
This image shows a mockup of what I’d like to achieve: http://bit.ly/13eDEIP (note you can see the Role being displayed using the function above). So I’d like to use the bbp_theme_after_reply_author_details hook to also display ranking, preferable with a tiny thumbnail of the image associated with the rank. It needs to identify the author of the post and show their ranking, not the currently logged in user.
I look forward to hearing from you!
- The topic ‘Ranking displayed in bbPress forums for each topic author?’ is closed to new replies.