Thank you. How do I find names of nav_item so I can remove other items as well in the future and not have to bother you?
Also, does this remove menu items from only student or everyone...if everyone, is there way to only remove it from student?
Thank you.
@torontomeme,
You have to just pass the names of these nav items. If you will check the above code, I have just passed the names of these nav tabs
Refer: http://prntscr.com/jki4o1
If you want to remove this for students only. You have to change the above code like this
add_action( 'bp_setup_nav', 'bp_remove_loggedin_menu_tabs', 999 );
function bp_remove_loggedin_menu_tabs() {
if (current_user_can('student'))
{
bp_core_remove_nav_item( 'activity' );
bp_core_remove_nav_item( 'settings' );
bp_core_remove_nav_item( 'dashboard' );
}
}
Author
Posts
Viewing 5 posts - 1 through 5 (of 5 total)
The topic ‘Change to Student page’ is closed to new replies.