Skip to:
Content
Pages
Categories
Search
Top
Bottom

Change default subnav

  • @psmorrow

    Participant

    Hi all, I found this code snippet to change the default subnav on the profile page, but can’t seem to get it working:

    function bp_change_default_profile_sub_nav() {
    	if ( bp_is_user_settings() ) {
    		global $bp;
    		$args = array(
    			'parent_slug'     => $bp->settings->slug, // Slug of the parent
    			'subnav_slug'     => 'profile',  // The slug of the subnav item to select when clicked
    		);
    	bp_core_new_nav_default($args);
     	}
    }
    
    // Change default sub navigation of profile settings main tab navigation
    add_action( 'bp_setup_nav', 'bp_change_default_profile_sub_nav', 5);
    

    Any suggestions?

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Change default subnav’ is closed to new replies.
Skip to toolbar