Changing default_subnav_slug for Activity
-
Short of changing core buddypressbp-activity.php, I haven’t been able to change the activity’s default_subnav_slug from Personal to Friends.
Does anyone have a clue?
I’m copied the whole bp_activity_setup_nav (from bp-activity.php) into a custom function inside the theme’s functions.php
function my_bp_activity_setup_nav {
global $bp;
bp_core_remove_nav_item(‘activity’);
bp_core_new_nav_item( array( ‘name’ => __( ‘Activity’, ‘buddypress’ ), ‘slug’ => $bp->activity->slug, ‘position’ => 10, ‘screen_function’ => ‘bp_activity_screen_friends’, ‘default_subnav_slug’ => ‘friends’, ‘item_css_id’ => $bp->activity->id ) );
// rest of original bp_activity_setup_nav but with subnav positions changed
}
add_action( ‘wp’, ‘my_bp_activity_setup_nav’);This did not work. I’m at a total lost because the changed subnav item positions in my_bp_activity_setup_nav() is reflected. Just not the default_subnav_slug / screen_function for Activity.
- The topic ‘Changing default_subnav_slug for Activity’ is closed to new replies.