2009-11-20 5 views
1

Wordpress Theme에서 작업 중입니다. 탐색에 대한 작업이 필요합니다. 작성하는 데 약간의 문제가 있습니다.Wordpress Navigation

내비게이션이 외모를 찾고 있습니다 : www.neu.edu/humanities.

나는 여기까지 입수했습니다 :

if (is_front_page()) { 
    wp_list_pages('title_li=&exclude=12&depth=1'); 
} 
else { 
    // display the subpages of the current page while 
    // display all of the main pages and all of the 
    // and display the parent pages while on the subpages 
} 

답변

0
<?php 
    if (is_front_page()) { 
     wp_list_pages('title_li=&exclude12&depth=1'); 
    } 
    else { 
     $output = wp_list_pages('echo=0&depth=1&title_li=&exclude=12'); 
     if (is_page()) { 
     $page = $post-ID; 
     if ($post->post_parent) { 
      $page = $post->post_parent; 
     } 
     $children = wp_list_pages('echo=0&child_of='.$page.'&title_li=&exclude=12'); 
     if ($children) { 
      $output = wp_list_pages('echo=0&child_of='.$page.'&title_li=&exclude=12'); 
     } 
     } 
     echo $output; 
    } 
?>