Skip to:
Content
Pages
Categories
Search
Top
Bottom

add a subnav in the single group page, andy?

  • @nicolagreco

    Participant

    I would like add a subnav menu in a single group page (only for admin), here is my code, but it doesnt’ work

    function bpdev_my_nav_setup_nav() {
    global $bp, $is_single_group, $group_obj;
    if ( $is_single_group ) {
    $grouppo_link = $bp['root_domain'] . '/' . $bp['groups']['slug'] . '/' . $group_obj->slug . '/';
    bp_core_add_subnav_item( $bp['groups']['slug'], 'update-position', __('My nav', 'buddypress'), $grouppo_link, 'bpdev_mynav', false, BP_Groups_Member::check_is_admin( $bp['logged_userid'], bp_group_id(false) ) );
    }
    }

    of corse after it my function bpdev_mynav

    UPDATE: it returns on my profile page

Viewing 2 replies - 1 through 2 (of 2 total)
  • @burtadsit

    Participant

    Nicola you are missing param $parent_id to bp_core_add_subnav_item()

    @nicolagreco

    Participant

    $bp is the param you said :S

    it doesn’t work only if you click on it like /groups/group-name/update-position

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘add a subnav in the single group page, andy?’ is closed to new replies.
Skip to toolbar