2014-01-21 7 views
0

부검 옵션 1.8.1Buddypress 그룹 홈 페이지 하위 메뉴 추가

그룹 홈페이지 아래에 하위 메뉴를 추가해야합니다. 홈 메뉴를 클릭하면 홈 메뉴 아래에 2 개의 하위 메뉴가 있어야합니다.

이미 하위 페이지를 만들었습니다. 하지만 홈 메뉴 아래에 하위 메뉴를 추가 할 수 없었습니다.

이 같은,

enter image description here

답변

0

나는 bp_core_new_subnav_item() 당신이 찾고있는 함수가 될 수 있다고 생각. 다음과 같이 사용하십시오 :

$args = array(
    'name'   => 'Snazzy Subnav', // Display name for the nav item 
    'slug'   => 'snazzy', // URL slug for the nav item 
    'parent_slug'  => 'home', // URL slug of the parent nav item 
    'parent_url'  => false, // URL of the parent item 
    'item_css_id'  => 'snazzy-id', // The CSS ID to apply to the HTML of the nav item 
    'user_has_access' => true, // Can the logged in user see this nav item? 
    'site_admin_only' => false, // Can only site admins see this nav item? 
    'position'  => 90, // Index of where this nav item should be positioned 
    'screen_function' => false // The name of the function to run when clicked 
); 

bp_core_new_subnav_item($args) 
+0

어디에서이 코드를 입력해야합니까? –

+0

테마의 functions.php에서 코드는 예제이며 값을 변경해야합니다. – henrywright