Support » Themes and Templates » How do I keep only specific Pages on nav bar

  • Hello,

    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, http://tinyurl.com/627w4t . The nav bar works perfectly. However, how do I set it up to only include the pages I want?

    I did some research and was told to use

    wp_list_pages('title_li=&include=4,37,22')

    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'); ?>
    </ul>   
    
    <?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; ?>
    </ul>
    <?php } else { ?>
    <?php } ?>

    Can someone help me?

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘How do I keep only specific Pages on nav bar’ is closed to new replies.