Skip to:
Content
Pages
Categories
Search
Top
Bottom

How to remove sub nav only for displayed user


  • addyClass
    Participant

    @addyclass

    Hello,

    I am trying to remove subnav for displayed user using function "bp_core_remove_nav_item( 'followers' );"

    This function also removing menu in header for current user. Please help me how i can remove sub menu based on current user and displayed user.

    Please help

Viewing 1 replies (of 1 total)

  • shanebp
    Moderator

    @shanebp

    What plugin are you using to enable ‘followers’ ?
    What version of BP are you using?

    You could try this:

    function addy_remove_profile_nav($nav_array) {
    
         if( is_super_admin() ) 
              return $nav_array;
    
         if ( ! bp_is_my_profile() )
    	$nav_array = '';
    
         return $nav_array;
    }
    add_filter('bp_get_displayed_user_nav_followers', 'addy_remove_profile_nav', 10, 1 );
Viewing 1 replies (of 1 total)
  • The topic ‘How to remove sub nav only for displayed user’ is closed to new replies.
Skip to toolbar