Replies
This is what I’ve tried so far:
add_action( ‘Prevent_Tenant_From_Others_profile’, function() {
if ( bp_is_user_profile() ) {
$user_meta = get_userdata( bp_loggedin_user_id() );if ( in_array( ‘tenant’, $user_meta->roles ) ) {
wp_redirect( home_url() );
exit;
}
}
}, 1 );Hi Brajesh! Thanks so much for your reply here! I actually don’t know where to start with an example using the bp_has_members hook in a loop. Are you able to provide me with a snippet that I can start with that includes filtering for a member type?
Thanks again!
Hi there, assume I have two member types (“employers” and “employees”). If I want to provide a link to a filtered list of all employees, is there a way to do so using a filter in the URL string like http://www.mybuddypressSite.com/members?=employers or something?