Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I have tried a variety of ways using bp_core_remove_nav_item(){} to remove the Send Invites menu item in a plug-in and in my theme's functions.php file and I either get no success in removing certain menu items or I get a Page not found result.

Does anyone know how to effectively remove sub nav menu items in Buddypress?

Thanks

This does not work in my functions.php:

function bbg_remove_send_invites_from_group() { bp_core_remove_nav_item( bp_get_current_group_slug(), 'send-invites' ); } add_action( 'bp_setup_nav', 'bbg_remove_send_invites_from_group' );

This does not work within a plugin:

function bbg_remove_send_invites_from_group() { bp_core_remove_nav_item( bp_get_current_group_slug(), 'send-invites' ); } add_action( 'bp_setup_nav', 'bbg_remove_send_invites_from_group' );

share|improve this question
    
any BuddyPress gurus out there? –  frank13 Jun 29 '12 at 13:59
add comment

2 Answers 2

Here's the answer:

bp_core_remove_subnav_item( bp_get_current_group_slug(), 'send-invites' );

Its _subnav_

share|improve this answer
    
I can't accept this as the answer until tomorrow (hate that silly feature in stackoverflow). Anyway I will be away for a week and will mostly not return to this thread so if anyone happens by, please accept this as the answer. Thanks. –  frank13 Jun 29 '12 at 19:11
add comment

Find and post the them code that displays the Sub Nav.it is like this,

<?php wp_nav_menu( array( 'theme_location' => 'top', 'container_id' => 'top-nav' ) ); ?>

remove this code from your page that display sub nav. if not work then go to your function.php an unregistered your sub nav function.

share|improve this answer
    
Please add an explanation to your answer: why could that solve the problem? What is the difference to the other answer(s)? –  toscho Jun 8 '13 at 6:26
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.