Add parentpage into subpage-menu sidebar
-
At the moment I have this code, to add a subpage menu in the sidebar on a parentpage:
<?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) { ?> <ul> <?php echo $children; ?> </ul> <?php } ?>
I am looking for a way to add the parent-page to this menu, as a link. That way, when you click a subpage, you can still get back to the parent-page through the sidebar-menu!
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Add parentpage into subpage-menu sidebar’ is closed to new replies.