Remove 'upload' from navigation

I would like to remove 'upload' from the navigation links as I have added a manual link to the upload form elsewhere on the page.

The usual way of removing BuddyPress nav items doesn't seem to work. I am using this function in my theme's functions.php:

function remove_upload_nav_item() {

global $bp;

bp_core_remove_nav_item( 'upload' );


add_action( 'bp_setup_nav', 'remove_upload_nav_item', 999 );

Can anyone help?


This helped us track a bug in our code. It's been fixed now. The code should work, if you retry.