Can you remove the some of the submenu items created by Events Manager?
-
Hi All,
Using Events Manager 4.0.82
I’m adding some additional functionality so that amongst other things, only Administrators can create events within the Buddypress section of Events Manager. Therefore, I would like to remove some of the Menu items from the menu so that non admins cannot create events.
I initially hacked the core (bad I know) so that only admins could see these menu items but now I want to reverse that and put the functionality into a plugin.
I’ve tried the following but am unable to get it to work. Does anyone have any ideas?
add_action( 'init', 'my_em_setup_nav' ); function my_em_setup_nav(){ global $bp; bp_core_remove_nav_item('events'); #bp_core_remove_nav_item('profile'); #as a test, this did work! }
Once the above can work I can pick up the events menu, then my actual requirement would be to remove the ‘My Events’ , ‘My Locations’ and ‘My Event Bookings’ sub menu items.
Thanks
- The topic ‘Can you remove the some of the submenu items created by Events Manager?’ is closed to new replies.