Return to Snippet

Revision: 54492
at December 29, 2011 23:23 by i-am-andy


Initial Code
<?php
              if($post->post_parent) {
              $children = wp_list_pages("title_li=&child_of=".$post->post_parent."&echo=0&sort_column=menu_order&exclude=88,93,91");
              $titlenamer = get_the_title($post->post_parent);
              }
            
              else {
              $children = wp_list_pages("title_li=&child_of=".$post->ID."&echo=0&sort_column=menu_order&exclude=88,93,91");
              $titlenamer = get_the_title($post->ID);
              }
              if ($children) { ?>
            
              <ul class="sidebar_nav">
              <?php echo $children; ?>
              </ul>
            
            <?php } ?>

Initial URL

                                

Initial Description
Wordpress hierarchical sidebar nav using wp_list_pages

Initial Title
Wordpress hierarchical sidebar nav

Initial Tags

                                

Initial Language
PHP