• I’m using the following code to populate my side nav and I’m having trouble figuring out where to put the “exclude” code to hide one of the pages. Can anyone help me out?

    <?php
    if($post->post_parent) { // page is a child
    wp_list_pages(‘sort_column=menu_order&title_li= &child_of=’.$post->post_parent);
    }
    elseif(wp_list_pages(“child_of=”.$post->ID.”&echo=0″) ) { // page has children
    wp_list_pages(‘sort_column=menu_order&title_li= &child_of=’.$post->ID );
    }
    ?>

Viewing 1 replies (of 1 total)
  • It would go in the wp_list_pages arguments:

    wp_list_pages(‘sort_column=menu_order&title_li= &child_of=’.$post->post_parent.’&exclude=14′);

Viewing 1 replies (of 1 total)
  • The topic ‘How to exclude a page from the sidenav’ is closed to new replies.