function bpfr_remove_change_avatar_tab() {
global $bp;
bp_core_remove_subnav_item( 'profile', 'change-avatar' );
}
add_action( 'bp_ready', 'bpfr_remove_change_avatar_tab', 15 );
BuddyBar items
Source: bp-core-buddybar.php
function bp_core_remove_subnav_item( $parent_id, $slug )
and to remove a nav item
function bp_core_remove_nav_item( $parent_id )
Hello Dan=
Thank you for the snippet.
This one is working too:
/* remove tabs*/
function remove_menu_tabs(){
global $bp;
unset($bp->bp_nav['profile']);
unset($bp->bp_options_nav['profile']['change-avatar']);
}
add_action('bp_setup_nav', 'remove_menu_tabs', 201);
I am trying to do the same, I tried these codes and it’s not working.
I added to my bp-custom.php file.
Maybe I am doing something wrong???
My ultimate goal is to hide specific profile menu options based on the users role, this looked like a good starting place, I must be missing something??