Advertisement
Guest User

sub nav code

a guest
Jul 1st, 2011
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  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>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement