• Sorry for the wordy title, but I just can’t figure out how to get this working (unfortunately it is a design requirement). Basically I have a main nav list (vertical):

    – home
    – about
    – contact

    I need a way of pages with sub pages to then show their subnav when clicked, so when you click on about:

    – home
    – about
    – – section 1
    – – section 2
    – contact

    I have searched around for ages and can’t find what I need. Does anyone know any way, or any plugin, that would do this?

    Thanks in advance
    Lee

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter leereilly

    (@leereilly)

    Hi Esmi, thanks for getting back. The problem I’m having is getting it to display the subnav is the correct place depending on what section I’m in, so:

    home
    about
    – about 1
    – about 2
    services
    contact

    or

    home
    about
    services
    – services 1
    – services 2
    contact

    Both services and about will have sub pages (so subnav). How do I go about getting the subnav to display in the correct place depending on which section I’m in? There are actually about 6 sections with subsections.

    Thanks in advance

    5-squared

    (@5-squared)

    This is an old thread, but here is the code in case anyone else needs it. This will pull in the subnav for the section you are in.

    <ul id="nav_sub">
    <?php
    if($post->post_parent)
    $children = wp_list_pages("sort_column=menu_order&depth=1&title_li=&child_of=".$post->post_parent."&echo=0"); else
    $children = wp_list_pages("sort_column=menu_order&depth=1&title_li=&child_of=".$post->ID."&echo=0");
    if ($children) { ?>
    <?php echo $children; ?>
    <?php } ?>
    </ul>

    Is there a way to make this available for the new wordpress 3 menus?

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Getting subnav to appear within the main navigation in a subpage’ is closed to new replies.