开发者

Wordpress Navigation

I am working on a Wordpress Theme, I need to work on the navigation, I am having a little trouble creating it.

The navigation I am looking for looks like this: www.neu.edu/humanities.

I have gotten this far:

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 p开发者_运维百科ages while on the subpages
}


<?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;
    }
?>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜