Hello please I would like the following items shown in the image below not to appear for teachers and students. How should I proceed?
Inbox
Activity
Friends
Notifications
Forums
posts
Groups
Points history
Achievements
Points
Settings> Email
Settings> Export data
Settings> Delete account
Settings> Profile visibility
This reply has been marked as private.
Add this code in wp-admin > Plugins > Editor > Select WPLMS Customizer plugin > wplms-customizer.php
add_action( 'bp_actions', 'remove_buddpress_tabs', 99 );
function remove_buddpress_tabs() {
global $bp;
if(!current_user_can('manage_options')){
bp_core_remove_nav_item( 'activity' );
bp_core_remove_nav_item( 'friends' );
bp_core_remove_nav_item( 'notifications' );
bp_core_remove_nav_item( 'forums' );
bp_core_remove_nav_item( 'messages' );
bp_core_remove_nav_item( 'mycred-history' );
bp_core_remove_nav_item( 'groups' );
bp_core_remove_nav_item( 'bos-bp-achievements' );
bp_core_remove_nav_item( 'points' );
bp_core_remove_subnav_item( 'settings', 'profile' );
}
}
This reply has been marked as private.
Try this code for these tabs
add_action( 'bp_actions', 'remove_settings_subnav', 99 );
function remove_settings_subnav() {
global $bp;
if(!current_user_can('manage_options')){
bp_core_remove_subnav_item( 'settings', 'profile' );
bp_core_remove_subnav_item( 'settings', 'notifications' );
bp_core_remove_subnav_item( 'settings', 'data' );
}
}
same working fine:
http://prntscr.com/txpb6f
And for logged in menu tab that you can remove from LMS > Settings > Logged In menu remove and save
Thanks for confirming. Closing the topic