@ttremain
6 years, 7 months ago
Thought I had an additional issue. ‘screen_function’ wasn’t getting reached. The theme was ALSO creating a menu item with the same slug.
Solved.
I have tried the code above, here:
add_action( 'bp_setup_nav', 'content_setup_nav_profile' ); function content_setup_nav_profile() { bp_core_new_nav_item( array( 'name' => 'projects', 'slug' => 'project', 'screen_function' => 'XX_bp_projects_screen', 'position' => 20, 'default_subnav_slug' => 'project', 'item_css_id' => 'projects', ) ); } function XX_bp_projects_screen() { // We never get here for some reason add_action( 'bp_template_title', 'XX_bp_projects_screen_title' ); add_action( 'bp_template_content', 'XX_bp_projects_screen_content' ); bp_core_load_template( apply_filters( 'bp_core_template_plugin', 'members/single/plugins' ) ); } //end function function XX_bp_projects_screen_title() { echo 'Projects<br/>'; } function XX_bp_projects_screen_content() { echo 'Dummy Content<br/>'; }
The icon shows, in the row with the others. Yet, it never launches the function listed under ‘screen_function’, XX_bp_projects_screen()
I’m perplexed..