Hi @pasalomoco
Have you tried checking the Member Directory settings to filter which user roles to display in the member directory results? Please go to WP Admin > Ultimate Member > Member Directories > Edit a directory > General Options > see “User Roles to Display”.
Regards,
Yes, i have this but i have a profile with two roles at the same time
A and B
I want to filter excluding the accounts with A role but not B role
-
This reply was modified 4 years, 2 months ago by
pasalomoco.
Hi @pasalomoco
Sorry for the late response.
This requires customization on your end. You can try modifying the following code snippet to display specific user roles to the member directory:
add_filter("um_prepare_user_query_args","um_011822_show_specific_user_roles");
function um_011822_show_specific_user_roles( $user_query ){
$user_query['role__in'] = array('my_b_role_slug');
return $user_query;
}
Regards,
Hi @pasalomoco
..Please feel free to re-open this thread by changing the Topic Status to ‘Not Resolved’ if any other questions come up and we’d be happy to help. 🙂
Regards,
Thanks for letting us know.
Regards,