Forums
Forums / Themes and Templates / Children pages menu
(@sergiselvas)
17 years ago
Hi Everyone I am trying to use a submenu each time there are children pages. I’m using this:
<?php $children = wp_list_pages(‘title_li=&child_of=’.$post->ID.’&echo=0&depth=1′); if ($children) { ?> <?php echo $children; ?><? } ?>
Chilndre pages menu is showing well, but when I click a children page on that submenu, it desapear from the submenu.
Sorry for my english, I’m trying my best, what I need is show the submenu always unless I click on another page
Thanks everyone for your help!
Resolve, more or less. I use 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) { ?> <?php echo $children; ?> <?php } ?>
But now, if I’m reading a subpage the parent is not showing actived. There is any solution for this?
Cheers
16 years, 12 months ago
See solution I found: http://wordpress.org/support/topic/258584
The topic ‘Children pages menu’ is closed to new replies.