@addyclass
9 years, 9 months ago
Hello,
I am trying to remove subnav for displayed user using function "bp_core_remove_nav_item( 'followers' );"
"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
@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 );