My custom Buddy Press Theme is missing the "Create a group" button. Everything else works. Any idea why?
Asked
Active
Viewed 1,158 times
1 Answers
2
I actually think this is just something they left out in the core files. I created a new one using hooks:
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 );

Andy Finkenstadt
- 3,547
- 1
- 21
- 25

Justin Broglie
- 21
- 2