Re: Changing default_subnav_slug for Activity
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’ );
`