Forum Replies Created
-
Are you using `bp_core_new_nav_item` ?
If you set the position to any value less than 10, it should work since Activity’s position is 10.`
bp_core_new_nav_item( array(
‘name’ => ‘Your Item’,
‘slug’ => ‘yourslug’,
‘position’ => 9, // Activity is 10, so any value lower than 10 should work
‘screen_function’ => ‘your_screen_function’,
‘default_subnav_slug’ => ‘your_default_subnav_slug’,
) );
`I finally figured it out (took way too long).
Here are the code snippets to be placed in bp-custom.php (NOT functions.php, my fatal hair-tearing mistake).`
/** wp-content/plugins/bp-custom.php **/
function my_change_activity_default_subnav() {
global $bp;
if (bp_is_my_profile()) {
bp_core_new_nav_default(array( ‘parent_slug’ => $bp->activity->slug, ‘screen_function’ => ‘bp_activity_screen_friends’, ‘subnav_slug’ => $bp->friends->slug));
}
}
add_action( ‘bp_setup_nav’, ‘my_change_activity_default_subnav’ );function my_change_activity_subnav_sequence() {
global $bp;
if (bp_is_my_profile()) {
// flip just-me and friends positions
$bp->bp_options_nav = ’20’;
$bp->bp_options_nav = ’10’;
}
}
add_action( ‘bp_activity_setup_nav’, ‘my_change_activity_subnav_sequence’ );
`I loathe to bump this, but I really really don’t want to hack core files to do this. Anyone?
Bump, anyone?
I have no wish to change the slug or labels.
What I want is to change the default subnav slug for Activity.Currently http://yoursite/members/myaccount/activity/ defaults to Personal.
I want to change this to default to Friends instead.