Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 5 replies - 1 through 5 (of 5 total)
  • @liping

    Member

    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’,
    ) );
    `

    @liping

    Member

    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’ );
    `

    @liping

    Member

    I loathe to bump this, but I really really don’t want to hack core files to do this. Anyone?

    @liping

    Member

    Bump, anyone?

    @liping

    Member

    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.

Viewing 5 replies - 1 through 5 (of 5 total)
Skip to toolbar