Posted By

troi on 01/20/11


Tagged

wordpress


Versions (?)

Vertical Submenu in Wordpress


 / Published in: PHP
 

  1. <?php
  2. if($post->post_parent)
  3. $children = wp_list_pages("title_li=&child_of=".$post->post_parent."&echo=0"); else
  4. $children = wp_list_pages("title_li=&child_of=".$post->ID."&echo=0");
  5.  
  6. if ($children && is_page()) { ?>
  7. <ul id="L2">
  8. <?php echo $children; ?>
  9. </ul>
  10. <?php } else { ?>
  11. <?php } ?>

Report this snippet  

You need to login to post a comment.