Forum Replies Created
-
I’m really sorry @danbp, I did it because the title of the topic not only refers to subnav items, but to main nav also. From now on, I’ll do as you stated.
Really appreciate your valuable help.Best,
JHello,
Working perfect for subnav items, but not for main nav in my case. Can’t get this to work:
function my_remove_group_tab() { bp_core_remove_nav_item( 'send-invites', 'groups' ); } add_action( 'bp_actions', 'my_remove_group_tab', 9 );
I don’t now what I’m missing here.
Appreciate any help.
Thank you very much, @danbp !
Best,
JavierHello,
Works really nice, thank you!
Do you now how to remove those items from user menu (top right dropdown)?
Thanks in advance.
Thanks, @danbp!
You are right: only the fallback was working
bp_core_redirect( bp_get_group_permalink( groups_get_current_group() ) );
.
Adding the $component (which defaults to ‘members’) is the key:bp_core_remove_subnav_item( $parent_nav_slug, $tab, 'groups' );
These functions are located in ‘bp-core/bp-core-buddybar.php’.
I’d also want to get rid of ‘send-invites’ in group primary navigation, but this is not working for me:bp_core_remove_nav_item( 'send-invites', 'groups' );
Thank you,
JavierHello!
Is this still the way to go with BP 2.6.0?
I can’t get things to work (I want to remove ‘edit-settings’ and ‘delete-group’).By the way, why should the slug be “_manage” instead of “admin”?
Thanks in advance,
JavierThis is what I came up with:
function sample_admin_notice__warning{ if ( xprofile_get_field_id_from_name('My xProfile Custom Field') ) { return; } $class = 'notice notice-warning'; $message = __( 'Please, add new "My xProfile Custom Field" Profile Field','textdomain'); printf( '<div class="%1$s"><p>%2$s</p></div>', $class, $message ); } add_action( 'admin_notices', 'sample_admin_notice__warning' );
It does the job, what do you guys think?