• я пробовал использовать функцию bp_core_create_nav_link(),но она почему то не работает…

    function a21_nav(){
    global $bp;
    // $bp = buddypress();
    // buddypress()->groups->nav->add_nav( $args );
    
        $args = array(
        'name'                    => 'new_link21', // Display name for the nav item.
        'slug'                    => 'new_link21', // URL slug for the nav item.
        'link'                     => 'new_link21.ru',
        'item_css_id'             => 'we', // The CSS ID to apply to the HTML of the nav item.
        'show_for_displayed_user' => true,  // When viewing another user does this nav item show up?
        'site_admin_only'         => false, // Can only site admins see this nav item?
        'position'                => 99,    // Index of where this nav item should be positioned.
        'screen_function'         => 'a21_callback_sf', // The name of the function to run when clicked.
        'default_subnav_slug'     => false  // The slug of the default subnav item to select when clicked.
    );
        // echo $args;
    
    echo bp_core_create_nav_link( $args, $component = 'groups' );}
  • Тема «Как в buddypress добавить новый пункт в меню групп» закрыта для новых ответов.