SHARE
TWEET

sub nav code

a guest Jul 1st, 2011 132 Never
  1. <div id="sub-menu">
  2.         <ul>
  3. <?php if($post->post_parent)
  4. $children = wp_list_pages("title_li=&child_of=".$post->post_parent."&echo=0"); else
  5. $children = wp_list_pages("title_li=&child_of=".$post->ID."&echo=0");
  6.  
  7. if ($children && is_page()) { ?>
  8. <?php echo $children; ?>
  9. <?php } else { ?>
  10. <?php } ?>
  11.         </ul>
  12. </div>
RAW Paste Data
Top