Submenu items are not appeared in created menu
-
Hello everybody. Need your help. I’ve created new item in menu which is called “Force”. Submenu items are “Air” and “Water”. “Air” should be appeared by default by clicking on “Force”. Main menu item “Force” is visible but no one submenu are visible. Appreciate your help, code:
bp_core_new_nav_item( array( 'name' => __( 'Force', 'buddypress' ), 'slug' => 'force', 'position' => 1, 'screen_function' => 'force_link', 'default_subnav_slug' => 'force-sub', ) ); bp_core_new_subnav_item( array( 'name' => __( 'Air', 'buddypress' ), 'slug' => 'force-sub', 'parent_url' => $bp->loggedin_user->domain . $bp->force->slug . '/', 'parent_slug' => $bp-> force->slug, 'position' => 11, 'screen_function' => 'force_link', 'show_for_displayed_user' => true, 'item_css_id' => 'force' ) ); bp_core_new_subnav_item( array( 'name' => __( 'Water', 'buddypress' ), 'slug' => 'addforce', 'parent_url' => $bp->loggedin_user->domain . $bp->force->slug . '/', 'parent_slug' => $bp-> force->slug, 'position' => 12, 'screen_function' => 'addforce_link' ) ); } add_action( 'bp_setup_nav', 'my_setup_nav', 99 );
- The topic ‘Submenu items are not appeared in created menu’ is closed to new replies.