wp_list_pages issue
-
Hi all,
I’m currently working on a new theme which I plan to release soon. In the top of the page I have a menu which I plan to list all of the top level pages and then, once into one of the pages, list all of the subpages. I have that working fine using the followign code:
<ul>
<li><a href="index.php">Home</a></li>
<?php wp_list_pages('sort_column=menu_order&title_li=&depth=1'); ?>
</ul><?php if(wp_list_pages("child_of=".$post->ID."&echo=0")) {??>
<ul id="submenu">
<?php wp_list_pages("title_li=&child_of=".$post->ID."&sort_column=menu_order&depth=2");?>
</ul>
<?php } ??>However… I have a problem. If I click on a ‘parent page’ followed by the ‘child page’ all of that childs ‘sibling pages’ (pages owned by the same parent) vanish from the menu. It would seem logical to me that they should stay visible, but I can’t seem to get it working.
Does anyone have any suggestions for how I could do this please?
I really appreciate the help. Thanks!
Andy
- The topic ‘wp_list_pages issue’ is closed to new replies.