View Full Version : Listing specific pages on nav bar in Word PRess

09-06-2011, 01:30 AM

I'm trying to set up my Word Press theme to list only specific pages on the nav bar. For my nav bar, I'm using code for a drop down menu that I found on a site. THe nav bar works perfectly. However, how do I set it up to only include the pages I want?

I looked at a site and it said to use

However, when I use it with my code, it messes up my nav bar. Here's my code. Any idea of what I could try.

<ul id="nav">
<?php wp_list_pages('title_li=&depth=1'); ?>

<?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 && is_page()) { ?>
<ul id="subnav">
<?php echo $children; ?>
<?php } else { ?>
<?php } ?>