$10
Displaying Child Pages
Hi There,
I have a fairly basic question of how to display child pages on my custom page template?
The code that I have now will will in the sub pages, but the problem is when you click on one of the subpages, the rest of the nav disappears. I need to have the sub-menu stay the same for all sub pages.
For example, here is a navigation structure:
I do not want Page A to be in the sub-nav as it will already be in the main nav. I would want Pages B through E to be visible on all sub pages.
I really appreciate your help.
Here's the code that I'm using now:
I have a fairly basic question of how to display child pages on my custom page template?
The code that I have now will will in the sub pages, but the problem is when you click on one of the subpages, the rest of the nav disappears. I need to have the sub-menu stay the same for all sub pages.
For example, here is a navigation structure:
- Page A
- Page B
- Page C
- Page D
- Page D2
- Page D3
- Page E
I do not want Page A to be in the sub-nav as it will already be in the main nav. I would want Pages B through E to be visible on all sub pages.
I really appreciate your help.
Here's the code that I'm using now:
<ul>
<?php
if($post->post_parent)
$children = wp_list_pages("sort_column=menu_order&depth=2&title_li=&child_of=".$post->post_parent."&echo=0"); else
$children = wp_list_pages("sort_column=menu_order&depth=2&title_li=&child_of=".$post->ID."&echo=0");
if ($children) { ?>
<?php echo $children; ?>
<?php } ?>
</ul>
5- Squared | 04/18/10 at 11:46am |
Answers | Tags
(1) Possible Answers Submitted...
You must be logged in to view answers or answer this question.



