Support » Plugin: BuddyPress Member Type Generator » Hide buddypress tab based on Member Type

  • I want to check the user you are looking at and hide tabs based on their type. I have 3 options (captain, inspirationbrigade, and no type)

    function bpfr_hide_activity_nav() {
    $member_type = bp_get_member_type( get_current_user_id() );
    if ( $member_type == ‘inspirationbrigade’ )
    bp_core_remove_nav_item( ‘activity’ );
    add_action( ‘bp_ready’, ‘bpfr_hide_activity_nav’ );

    I put this in bp_custom.php but it breaks my website. Does it breaks because I don’t specify the other types? Or is my code totally wrong? Any help on this would be great, thanks!

  • The topic ‘Hide buddypress tab based on Member Type’ is closed to new replies.