regarding bp_core_new_nav_item.
-
Hi guys. I’ve asked this question before, but in a different way.
When adding a new tab to the profile you would use this code.
bp_core_new_nav_item( array( 'name' => 'Document List', 'slug' => 'group-document-list', 'parent_url' => $bp->loggedin_user->domain . $bp->groups->slug . '/', 'parent_slug' => $bp->groups->slug, 'screen_function' => 'group_document_list_function_to_show_screen', 'position' => 55 ) ); function group_document_list_function_to_show_screen() { //add title and content here - last is to call the members plugin.php template add_action( 'bp_template_title', 'group_document_list_function_to_show_screen_title' ); add_action( 'bp_template_content', 'group_document_list_function_to_show_screen_content' ); bp_core_load_template( apply_filters( 'bp_core_template_plugin', 'members/single/plugins' ) ); } function group_document_list_function_to_show_screen_title() { echo 'Documents for this group'; } function group_document_list_function_to_show_screen_content() { display_group_document_list(); }
everything works out fine.. Now.. what I want to do with this code is instead of having the template load though
bp_core_load_template( apply_filters( 'bp_core_template_plugin', 'members/single/plugins' )
I would like to use my own template.
Eg (MYPLUGIN_PLUGIN_DIR .'\includes\screens\screenone-template.php');
)It works.. for the most part, but at the bottom of the page I get a Page not found.. 🙁
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘regarding bp_core_new_nav_item.’ is closed to new replies.