Skip to:
Content
Pages
Categories
Search
Top
Bottom

Reply To: adding member directory to a tab

@mmoore5553

Participant

This is what i have in my bp-custom.php

add_action('bp_setup_nav', 'mb_bp_profile_menu_posts', 301 );
function mb_bp_profile_menu_posts() {
global $bp;
bp_core_new_nav_item(
	array(
        'name' => 'All Members',
        'slug' => 'allmembers',
        'position' => 60, 
        //'default_subnav_slug' => 'published', // We add this submenu item below 
        'screen_function' => 'my_posts_screen_link'
	)
);
function my_posts_screen_link() {
    add_action( 'bp_template_title', 'my_posts_screen_title' );
    add_action( 'bp_template_content', 'my_posts_screen_content' );
    bp_core_load_template( apply_filters( 'bp_core_template_plugin', 'members/single/plugins' ) );
}

function my_posts_screen_title() {
    echo 'All Members';
}

function my_posts_screen_content() {
    get_template_part( 'members/single/allmembers.php' );
    //or you can put code here; only useful for short bits or echoing plain text
}

}
Skip to toolbar