• I’ve got a problem with listning the parent and its sub-pages when on a sub-sub-page.

    My current code is this:

    <?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) { ?>
    			<div id="subnav">
    				<div class="subtop"></div>
    					<div class="subcontent">
    						<ul>
    						<?php echo $children; ?>
    						</ul>
    					</div>
    				<div class="subbottom"></div>
    			</div>
    			<?php } ?>

    What i want to do is have the menu show the same all the time even when on a SUB-SUB-page. Now it’s just the same when on the top-parent and when on a child. Not when on a child of a child …

    How can i modify that code the display the parent and its childs even when on a child of a child?

    Please help. ??

    Regards,
    Tommie Hansen

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘wp_list_pages sub sub-pages’ is closed to new replies.