Skip to:
Content
Pages
Categories
Search
Top
Bottom

How to add a NEW nav item to GROUPS nav bar

Viewing 8 replies - 1 through 8 (of 8 total)
  • Please help anyone?

    zzzzzzzzzzz…….

    Avatar of odiseo
    odiseo
    Member

    @odiseo

    …………..

    Avatar of Hugo
    Hugo
    Moderator

    @hnla

    want to create a NEW tab in GROUPS bar to direct user’s to group activity page

    Not sure this makes sense?

    the link ‘home’ points to the activity stream for the group and is the displayed landing page by default.

    Avatar of Boone Gorges
    Boone Gorges
    Keymaster

    @boonebgorges

    Avatar of odiseo
    odiseo
    Member

    @odiseo

    @hnla Well “Home” is supposed to show a frontpage for the group, In “Activity” i want to show the activity page, that’s why i need a new tab :)

    Avatar of odiseo
    odiseo
    Member

    @odiseo

    Ok, I found my answer:
    1. Go to /wp-content/plugins/buddypress/bp-groups.php
    2. After line 200, you’ll see that the nav bar items are added for Groups page
    3. Then just add something like:
    bp_core_new_subnav_item( array( ‘name’ => ‘Your New Tab’, ‘slug’ => ‘your-new-tab’, ‘parent_url’ => $group_link, ‘parent_slug’ => $bp->groups->slug, ‘screen_function’ => ‘your_screen_function’, ‘position’ => 11, ‘item_css_id’ => ‘home’ ) );

    You can change ‘position’ integer considering that all other nav bar items have presets values of 10 multiples (10,20,30…)

    Avatar of mutualdesigns
    MutualDesigns
    Member

    @mutualdesigns

    Is it possible to add a class and title to the nav item for javascript application purposes?

Viewing 8 replies - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.