Hi @kgw203
Thanks for the details,
1.Sorry for the formatting, I meant <code>user.id</code>
2. Use this code snippet for adding user_nicename inside JSON data:
You may insert it into the functions.php file in your theme/child-theme.
function um_my_custom_ajax_get_members_data( $data_array, $user_id, $directory_data ) {
$user_obj = get_userdata( $user_id );
if ( false === $user_obj ) {
return $data_array;
}
$data_array['nicename'] = $user_obj->user_nicename;
return $data_array;
}
add_filter( 'um_ajax_get_members_data', 'um_my_custom_ajax_get_members_data', 10, 3 );
Then edit your members-grid.php template file. https://www.screencast.com/t/2nvNyRXEp
3. As an alternative way if you want to use nicename
everywhere as display_name then please use this snippet inside your functions.php file.
function um_my_custom_user_display_name_filter( $name, $user_id, $html ) {
$user_obj = get_userdata( $user_id );
if ( false === $user_obj ) {
return $name;
}
$name = $user_obj->user_nicename;
return $name;
}
add_filter( 'um_user_display_name_filter', 'um_my_custom_user_display_name_filter', 10, 3 );
There is an article about templates overriding
https://docs.ultimatemember.com/article/1516-templates-map
Let me know if you have other questions,
Best Regards!