• Resolved Julian

    (@julian12)


    Hi there,

    This plugin is amazing, thank you so much for it.

    I’m wondering if there is possibly some way to hide the Following subnav tab on a users activity (website.com/members/username/activity/following/) from other people.

    I feel like it may be a privacy concern, since other people and the public are able to see the activity of other users that one user is following. Therefore, I am wondering if there is a way to only have that subnav tab visible to the user who is signed in and visiting their own BuddyPress profile.

    Thank you again for the awesome plugin, and thanks for taking your time to read this.

    Sincerely,
    Julian

Viewing 1 replies (of 1 total)
  • Thread Starter Julian

    (@julian12)

    I managed to solve the problem.

    For anyone else looking to hide the activity/following subnav from users who aren’t the signed in user, here is the code (add it to your bp-custom.php).

    /**
    * Hide profile activity subnav from public
    */
    function bpex_hide_profile_menu_tabs() {
    
    	if( bp_is_active( 'xprofile' ) ) :
    
    	if ( bp_is_user() && !is_super_admin() && !bp_is_my_profile() ) {
    	//	BP's profile main menu items. Comment those to show.
    		bp_core_remove_subnav_item( 'activity', 'following' );		
    	}
    	endif;
    }
    add_action( 'bp_setup_nav', 'bpex_hide_profile_menu_tabs', 15 );
Viewing 1 replies (of 1 total)

The topic ‘Following Activity is Public’ is closed to new replies.