Forum breadcrumbs – You are here:Asgaros Support ForumSupportDisplay user meta data
Please or Register to create posts and topics.

Display user meta data

Hi there, we’re experimenting with using Asgaros on an existing site, that already has users in groups (from the Learndash plugin). The Learndash group that a user belongs to displays in an individual’s user profile.

I’d like to echo the Learndash group underneath the user’s name in the forum.

Is there any way to go about adding custom user meta in this place?

Cheers,

Mike

Hey Mike,

you can use a code like this:

add_filter('asgarosforum_filter_post_username', 'add_custom_value', 10, 2);

function add_custom_value($username, $user_id){
    $user_meta=get_userdata($user_id);

    $user_group= function_of_learndeash_to_get_usergroup($user_id);

    $username = $username . $user_group;

    return $username;
}

So you just need to get the information of Learndash on how to get the usergroup of an user and change it with function_of_learndeash_to_get_usergroup($user_id);

 

Need professional help with Asgaros Forum? Book an appointment with us at domra Web Solutions for setup and customization services. Learn more about our Toolbox for Asgaros Forum plugin to enhance your forum experience.