• Hi all

    I have a page structure like this:

    —————————–

    Home

    Projects
    – Work_1
    – Work_2
    – Work_3
    – Work_4

    —————————–

    Home and Projects are Pages. Work_1 – Work_4 are pages with Projects as their parent.

    When I click the Projects page I’m using this code to get the children of Projects as a
    sub menu, so I get Work_1 Work_2 Work_3 Work_4 as the sub menu.

    `<?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) { ?>

      <?php echo $children; ?>

    <?php } ?>

    How can I include include Projects in this sub menu so I get

    Projects Work_1 Work_2 Work_3 Work_4

    Hope I have explained this and thanks in advance for any help.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘List Parent page with sub pages.’ is closed to new replies.