这是我的网站结构(wordpress页面)
 - HOME -
 - Tutorial -
    + PHP Tutorial +
    + Photoshop Tutorial +
    + Css Tutorial + 
    + HTML Tutroial +   
 - news -
    + November
    + September
    + May 
    + April
 - about -
 - contact -
 如何将输出仅用于具有子页面的页面?因此,当我单击教程页面时,教程页面有以下列表。(但单击子页面时,页面列表保持静态。
我正在使用这段代码,但这只显示所有子页面,没有父页面。
<?php
  if($post->post_parent)
  $children = wp_list_pages("title_li=&child_of=".$post->post_parent."&echo=1");
  else
  $children = wp_list_pages("title_li=&child_of=".$post->ID."&echo=0");
  if ($children) { ?>
  <ul>
  <?php echo $children; ?>
  </ul>
  <?php } ?>