How do I get the slug for a tab I want to hide?
-
WordPress 4.9.5 -> BuddyPress 2.9.4
Hi all,
This is when viewing a user’s profile page. I removed the Friends tab with the below code but the View tab is still showing (it’s not necessary since the Profile tab is there and points to the same place, the user’s profile page). Is there a list somewhere of the slugs for the tabs or is there a function that can generate that? Or am I completely off about this 🙂
Thanks in advance.
function remove_nav_items() {
if ( !bp_is_my_profile() && !is_super_admin()) {
bp_core_remove_nav_item( 'friends' );
bp_core_remove_nav_item( 'view' );
}
}
add_action( 'bp_setup_nav', 'remove_nav_items',301);
- You must be logged in to reply to this topic.