Jason Griffith
Jason Griffith

Reputation: 11

Hide sub-nav option from Buddypress Profile Page

I'm trying to hide the "Change Avatar" option from the Member Profile page in BuddyPress. I've been digging through the code and from what i can tell there is a multidimensional array that is used to create this nav along with other navs for Groups and what not. Does anyone know of any hooks that I can use to disable just the sub-nav item? Not sure what the slug/id would be for this and not sure if I can disable it that way.

Here's a screen shot of what I'm trying to remove (note: I've changed the name from the default "Change Avatar" to "Change Profile Picture".

Here's a screen shot http://dl.dropbox.com/u/722321/Screen%20shot%202012-05-16%20at%2012.46.53%20PM.png)

Thanks for any help. Jason

Upvotes: 1

Views: 1650

Answers (1)

shanebp
shanebp

Reputation: 1956

Try this in your bp-custom.php or theme's functions.php

function remove_change_avatar() {
    bp_core_remove_subnav_item( 'profile', 'change-avatar' );
}
add_action( 'bp_setup_nav', 'remove_change_avatar', 100 );

Upvotes: 4

Related Questions