Posted on August 8, 2013 , Last Modified on: August 8, 2013

Hide Friends of a User from Other users. Only Site Admin and the User can see his/her Friends

/**
 * Hide User Friends from Other Users
 * Only Admin or the user himself can see friends
 */
add_action('bp_friends_setup_nav','bpdev_custom_hide_friends_if_not_self');

function bpdev_custom_hide_friends_if_not_self(){
    if( bp_is_my_profile() || is_super_admin() )
        return ;

    bp_core_remove_nav_item( 'friends' );

}


You can put the above code in bp-custom.php

#buddypress #friends #bp-hack