I have researched how to add a new item in the navigation and I understand how it works. I’m trying to assign a new Subnavigation in messages. But I get an error message that the page can not be found.
I have programmed for my date Site a php file that reads and lists the Kisses. Anyone can send other users a kiss.
add_action('bp_setup_nav', 'bp_profile_submenu_messages' );
function bp_profile_submenu_messages() {
global $bp;
if(!is_user_logged_in()) return '';
bp_core_new_subnav_item( array(
'name' => 'Kisses',
'slug' => 'kisses',
'parent_url' => $bp->loggedin_user->domain . $bp->bp_nav['messages']['slug'] . '/'; ,
'parent_slug' => $bp->bp_nav['messages']['slug'],
'position' => 10,
'screen_function' => 'kisses_posts'
)
);
}
function kisses_posts(){
// a php-file (kisses.php) at members/single
bp_core_load_template( apply_filters( 'bp_core_template_plugin', 'members/single/kisses' ) );
}
I would be really grateful if someone could help me of you.
Thanks in advance