Quote from
qualmy91 on January 18, 2021, 5:16 am
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);
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);