Moving Links around
-
Hello Everyone,
I am trying to move some links around from the main Nav to the sub nav ie:
sub of Profile
Privacy
SettingsSub of MyGroups
CreateI have added the following code to my themes function.php and it moves the links as I want, but the first part bp_core_remove_nav_item seems to disable the page load.
`function boone_remove_blogs_nav() {
bp_core_remove_nav_item( ‘privacy’ );
bp_core_remove_nav_item( ‘settings’ );
bp_core_remove_nav_item( ‘invite-anyone’ );
}
add_action( ‘bp_setup_nav’, ‘boone_remove_blogs_nav’, 15 );function bp_add_create_group_subnav() {
global $bp;
$groups_link = ‘/groups-2/’;
$settings_link = $bp->loggedin_user->domain ;/* Add the subnav items to the groups nav item */
if (function_exists(‘bp_core_new_subnav_item’)) {
bp_core_new_subnav_item( array(
‘name’ => __( ‘Create Clan’, ‘buddypress’ ),
‘slug’ => ‘create’,
‘parent_url’ => $groups_link,
‘parent_slug’ => $bp->groups->slug,
‘screen_function’ => ‘groups_screen_group_home’,
‘position’ => 40,
‘item_css_id’ => ‘home’ ) );bp_core_new_subnav_item( array(
‘name’ => __( ‘Settings’, ‘buddypress’ ),
‘slug’ => ‘settings’,
‘parent_url’ => $settings_link,
‘parent_slug’ => $bp->profile->slug,
‘screen_function’ => ‘xprofile_screen_edit_profile_mmc’,
‘position’ => 30,
‘item_css_id’ => ‘home’ ) );bp_core_new_subnav_item( array(
‘name’ => __( ‘Privacy’, ‘buddypress’ ),
‘slug’ => ‘privacy’,
‘parent_url’ => $settings_link,
‘parent_slug’ => $bp->profile->slug,
‘screen_function’ => ‘xprofile_screen_edit_profile_mmc’,
‘position’ => 30,
‘item_css_id’ => ‘home’ ) );}
}
add_action(‘groups_setup_nav’, ‘bp_add_create_group_subnav’);
`
I was wondering what I am doing wrong?thanks in advance.
- The topic ‘Moving Links around’ is closed to new replies.