Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: How to Remove and Add Items in “bp_get_displayed_user_nav”


Boone Gorges
Keymaster

@boonebgorges

The following function, placed into your theme’s functions.php or bp-custom.php file, will remove the Blogs nav item from the Members section of the site:
`function boone_remove_blogs_nav() {
bp_core_remove_nav_item( ‘blogs’ );
}
add_action( ‘bp_setup_nav’, ‘boone_remove_blogs_nav’, 15 );`

Other top-level nav items can be removed by replacing ‘blogs’ with the appropriate name. Subnav items will work in a similar way, except using `bp_core_remove_subnav_item` and the extra $parent_id argument:
`function boone_remove_friends_activity_nav() {
bp_core_remove_subnav_item( ‘activity’, ‘friends’ );
}
add_action( ‘bp_setup_nav’, ‘boone_remove_friends_activity_nav’, 15 );`

Skip to toolbar