you can try to use User Capabilities
to limit user;
the above would allow you to limit users to only see events they’re attending
alternatively, you could add this to your theme’s functions.php file:
remove_action( 'bp_include', 'bp_em_init' );
it’ll prevent all BP features from working (including activity feeds etc).
I have the same problem as kawestphal. But I can’t find any capabilities to remove the Events tab from BuddyPress profile navigation.
I’ve added remove_action to my functions-custom.php (theme frisco-for-buddypress). But that changed nothing.
Any ideas?
Thanks in advance!
you probably need to insert it into functions.php because that’s loaded after EM files are loaded
@martinft
alternatively, you can try this
function my_remove_em_nav() {
global $bp;
$bp->bp_nav['events'] = false;
bp_core_remove_subnav_item($bp->groups->slug, 'events');
}
add_action( 'bp_setup_nav', 'my_remove_em_nav' );
Thanks, agelonwl! Your code works great!
Thanks agelonwl! I will say that when I add the code, it removes the Events tab from the Member’s Profile Navigation but it leaves a little block instead – a tab with no letters and smaller than the others.
Martinft, do you by chance get that as well? If not, what version of Buddypress are you using?
hi,
Please try this one instead
function my_remove_em_nav() {
global $bp;
bp_core_remove_subnav_item($bp->groups->slug,'group-events');
bp_core_remove_nav_item( 'events' );
}
add_action( 'bp_setup_nav', 'my_remove_em_nav' );
That one worked perfect agelonwl … Thanks so much!
Hi there
I’ve tried @aglonwl’s code with the line $bp->bp_nav['events'] = false;
in my child theme’s functions.php
but then it doesn’t display my menu or anything below that. To be precise, this is what I have:
function bbg_change_profile_tab_order() {
global $bp;
$bp->bp_nav['profile']['position'] = 10;
$bp->bp_nav['activity']['position'] = 20;
$bp->bp_nav['friends']['position'] = 30;
$bp->bp_nav['messages']['position'] = 40;
$bp->bp_nav['achievements']['position'] = 50;
$bp->bp_nav['settings']['position'] = 60;
// $bp->bp_nav['groups'] = false;
// $bp->bp_nav['blogs'] = false;
// $bp->bp_nav['forum'] = false;
// $bp->bp_nav['events'] = false;
}
add_action( 'bp_setup_nav', 'bbg_change_profile_tab_order', 999 );
The menu order gets modified, but as soon as I remove the comment chars //
it breaks.
I’m using WordPress 3.4.2, Buddypress 1.6.1, Events Manager 5.2.6. Any advice would be appreciated.
Cheers
Kobus