Support » Plugins and Hacks » List Sub pages, except on home page

  • Hi,

    I am trying to add a list of sub pages to my sidebar.

    I have successfully done that with this code:

    <?php
        global $wp_query;
        if( empty($wp_query->post->post_parent) )
          {
             $parent = $wp_query->post->ID;
          }
        else
         {
             $parent = $wp_query->post->post_parent;
         } ?>
    <?php if(wp_list_pages("title_li=&child_of=$parent&echo=0" )): ?>
        <div id="submenu">
         <ul>
          <?php wp_list_pages("title_li=&child_of=$parent" ); ?>
         </ul>
        </div>
    <?php endif; ?>

    However, I would like to NOT have the “Related” box show up on the home page.

    And I would like to exclude certain pages from showing up (such as the Thank You page beneath the Contact page).

    Does anyone know how to do this?

    Thanks,
    Josh

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘List Sub pages, except on home page’ is closed to new replies.