• guruxl

    (@guruxl)


    I am trying to get a sub menu set up for my site. I need it to be like this on top-level pages

    • Overview
    • Page One
    • Page Two

    Sub Pages

    • Overview
    • Page One
    • Sub-Sub Page One
    • Sub-sub Page Two
    • Page Two
    • How can I do this? I know I can use this:

      <?php
                        if($post->post_parent)
                          $children = wp_list_pages("title_li=&child_of=".$post->post_parent."&echo=0"); else
                          $children = wp_list_pages("title_li=&child_of=".$post->ID."&echo=0");
                            if ($children) { ?>
                              <ul class="submenu">
                                <li><a href="<?php get_permalink($post->post_parent); ?>">Overview</a></li>
                                <?php echo $children; ?>
                              </ul>
                      <?php } else { echo '<ul class="submenu"><li>Overview</li>'; }  ?>

      Thanks for any help.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Dynamic Submenu Navigation’ is closed to new replies.