Skip to:

Changing default tab in the settings menu

  • Roger Coathup


    Can’t get bp_core_new_nav_default() function to work for the settings menu. Any thoughts would be appreciated.

    I’ve tried using the bp_core_new_nav_default() function to change the default tab in settings to notifications, but it doesn’t appear to have any effect on the menu:

    function settings_default_subnav() {
    global $bp;

    bp_core_new_nav_default ( array( ‘subnav_slug’ => ‘notifications’, ‘parent_slug’ => $bp->settings->slug, ‘screen_function’ => ‘bp_core_screen_notification_settings’ ) );

    add_action( ‘bp_setup_nav’, ‘settings_default_subnav’);

    Any thoughts on why this wouldn’t work?

    We tried this with various priority settings, and in both bp-custom.php and functions.php – but it just seems to be ignored.
    Is bp_setup_nav the right action to hook onto?

Viewing 3 replies - 1 through 3 (of 3 total)

  • @mercime



    the bad way – change `’position’ => 20, to ‘position’ => 10,` and vise versa in core lines 21 and 22 :-)

    or an easy way

    `remove_action( ‘bp_setup_nav’, ‘bp_core_add_settings_nav’ );

    add_action( ‘bp_setup_nav’, ‘bp_core_roger_settings_nav’ );
    funtion bp_core_roger_settings_nav() {
    global $bp;
    // the stuff

    looking for the best way

    Roger Coathup


    @mercime – yes, we had already had to adopt the solution of writing our own version of bp_core_add_settings_nav() – similarly to your suggestion.

    Unfortunately, this doesn’t answer why bp_core_new_nav_default() doesn’t work with the settings menu.

    I ran into this same issue trying to default the Settings nav entry to the Notifications subnav. Seems like a bug.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Changing default tab in the settings menu’ is closed to new replies.
Skip to toolbar