@chrishustert
6 years, 10 months ago
Thanks David, but I have found another cool solution. It’s not Pet Owner and Pet Groomer anymore though. Hope it helps other people, too!
** * Remove certain tabs from user profile based on member role. */ function buddydev_remove_tabs_based_on_member_roles() { if ( ! bp_is_user() ) { return; } $premium_dog_owner = bp_current_user_can( 'premium_dog_owner' ); $premium_dog_borrower = bp_current_user_can( 'premium_dog_borrower' ); $premium_user = ($premium_dog_owner ? : $premium_dog_borrower); if ( ! $premium_user ) { bp_core_remove_nav_item( 'friends' ); //removes the tab friends bp_core_remove_nav_item( 'messages' ); //removes the tab messages bp_core_remove_nav_item( 'reviews' ); //removes the tab reviews } } add_action( 'bp_setup_nav', 'buddydev_remove_tabs_based_on_member_roles', 1001 );