Child Pages Not Nesting
-
I’m trying to build a vertical nested nav bar and have been unsuccessful in sorting out why my child pages aren’t nesting under their appropriate parent pages.
The mostly generic wp_list_pages subpage code I’m using:
<div id="pagenav"> <ul> <?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"); wp_list_pages("title_li=&depth=1&exclude=2"); if ($children) { ?> <?php echo $children; ?> </ul> </div> <?php } ?>
The children of the current page show up underneath all of the page items. This site currently lives at stlukes.dreamhosters.com. View a specific example at https://www.stlukes.dreamhosters.com/christian-education/ and notice the children show up after “Contact Us.” I’m sure I’ve overlooked some simple detail. Blarg!
I’m fairly well versed with WordPress, but I’m a newb to PHP. Please be gentle!
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Child Pages Not Nesting’ is closed to new replies.