Forums
Forums / Fixing WordPress / wp_list_pages submenu shows parent
(@obgaoml)
13 years, 1 month ago
Click on the page, the pages’ structure looks right,
-A +A1 +A2 +A3 -B +B1 +B2 -C +C1 +C2
but if -A’s submenu selected, the pages only shows all usbmenus, looks like this
+A1 +A2 +A3
How can I make the structure always like this
here is the code I have
<?php if($post->post_parent) $children = wp_list_pages("title_li=&child_of=".$post->parent."&echo=0"); else $children = wp_list_pages("title_li=&child_of=".$post->ID."&echo=0"); echo $children; ?>
Thanks in advance
The topic ‘wp_list_pages submenu shows parent’ is closed to new replies.