Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

sub nav code

By: a guest on Jul 1st, 2011  |  syntax: None  |  size: 0.31 KB  |  views: 113  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  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>