I have a page structure like this:


   - 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.

    $children = wp_list_pages("title_li=&child_of=".$post->post_parent."&echo=0");
    $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.


Found it thanks - thought I'd looked here but I must of missed it.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.