Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 1 replies (of 1 total)

  • daganread
    Participant

    @daganread

    I know this thread is 2 years old. But here’s my problem:

    I would like to display different member profiles for different types of groups. I have 2 groups: faculty and contributor. More accurately i want to disable components like bp Links and group docs wiki for the faculty group; i settled for removing the links to such.

    i thought the best approach would be to check if a member is of a certain group and then based on the conditional statement, remove the unnecessary tabs in the profile menu. If there is a better approach. Please lead the way:)

    in my theme’s function.php:

    `
    if(groups_is_user_member( bp_loggedin_user_id(), BP_Groups_Group::get_id_from_slug(‘faculty’))){

    function setup_nav() {
    global $bp;

    // Remove a menu item
    bp_core_remove_nav_item( ‘messages’ );

    }

    add_action( ‘bp_setup_nav’, ‘setup_nav’, 1000 );
    }
    `

    if i make the conditional statement truthy the appropriate tab is removed. If i stick the code in the if statement into something like header.php it works. BUT for some reason, together they do not.

    Perhaps functions.php cannot reach such functions? I tried putting it into bp-custom.php, site just crashed.

    Thank you for your time, any help would be appreciated 🙂

Viewing 1 replies (of 1 total)
Skip to toolbar