Skip to:
Content
Pages
Categories
Search
Top
Bottom

groups tab


  • limskey
    Participant

    @limskey

    hi, I have been searching and searching and stumbled upon the following code (please see below). problem is that when the tab/link is created it goes to the homepage instead of the “create a group” page. can someone help me out?

    function groups_subnav_hook() {
    global $bp;

    $groups_link = $bp->loggedin_user->domain . $bp->groups->slug . ‘/’;

    bp_core_new_subnav_item( array(
    ‘name’ => ‘Create New Group’ ,
    ‘slug’ => ‘create’,
    ‘parent_slug’ => $bp->groups->slug,
    ‘parent_url’ => $groups_link,
    ‘position’ => 10,
    ‘screen_function’ => ‘groups_screen_group_members’,
    ‘user_has_access’ => bp_is_my_profile() // Only the logged in user can access this on his/her profile
    ) );
    }
    add_action( ‘wp’, ‘groups_subnav_hook’, 2 );
    add_action( ‘admin_menu’, ‘groups_subnav_hook’, 2 );

  • You must be logged in to reply to this topic.
Skip to toolbar