Skip to:
Content
Pages
Categories
Search
Top
Bottom

Buddypress privacy for tabs


  • Max Zhubr
    Participant

    @max-zhubr

    Hi there!

    Is there a way to make tabs (like groups, events) in profile menu hidden to other users, except owner of profile?

Viewing 4 replies - 1 through 4 (of 4 total)

  • Henry Wright
    Moderator

    @henrywright

    BP Simple Private might be helpful?


    shanebp
    Moderator

    @shanebp

    BP Simple Private is not that granular – it makes all Profile pages either public or private.
    And, more importantly, it only affects users who are not logged in.


    shanebp
    Moderator

    @shanebp

    For standard BP profile tabs, try:

    function zhubr_remove_profile_nav_item( $nav ) { 
    	
        if ( ! bp_is_my_profile() )
    	$nav = '';
    		
        return $nav;
    }
    add_filter('bp_get_displayed_user_nav_notifications', 'zhubr_remove_profile_nav_item', 20, 1 );
    add_filter('bp_get_displayed_user_nav_groups', 'zhubr_remove_profile_nav_item', 20, 1 );
    // add additional calls for other tabs

    To remove custom tabs, try:

    function zhubr_remove_custom_profile_tab() {
    	
        if ( bp_is_user() && ! bp_is_my_profile() )
    	bp_core_remove_nav_item( 'events' );
    	
    }
    add_action( 'bp_ready', 'zhubr_remove_custom_profile_tab', 25 );

    Max Zhubr
    Participant

    @max-zhubr

    shanebp, Thank You very much for Your help!!!

    You’ve just save me!)

    Hope Your advice will help smb. else.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Buddypress privacy for tabs’ is closed to new replies.
Skip to toolbar