How to hide child pages in sub navigation menu?
-
I’m using whitehouse theme.
I do not want the child pages to show up in the sub navigation menu.
What should I do?
Thanks in advance.This is the code for subnav.php
<div id=”subnav” class=”fix”>
<!– Code for subnav if pages have parents.. –><?php
if(count($post->ancestors)==2) $children = wp_list_pages(“title_li=&depth=1&child_of=”.$post->ancestors[1].”&echo=0&sort_column=menu_order”);
elseif($post->post_parent) $children = wp_list_pages(“title_li=&depth=1&child_of=”.$post->post_parent.”&echo=0&sort_column=menu_order”);
else $children = wp_list_pages(“title_li=&depth=1&child_of=”.$post->ID.”&echo=0&sort_column=menu_order”);if ($children) { echo $children;}
?></div><!– /sub nav –>
- The topic ‘How to hide child pages in sub navigation menu?’ is closed to new replies.