post;
$ancestors = get_post_ancestors($post);
print_r($ancestors);
if (empty($post->post_parent)) {
$parent = $post->ID;
} else {
$parent = end($ancestors);
}
// If the page is more than 1 level deep build the subnav (don't show on the homepage)
if($ancestors) {
// If a page is 3 or more levels deep
if(count($ancestors) > 1) {
$section_ID = $ancestors[0];
// If a page is 2 levels deep
} else {
$section_ID = $post->ID;
}
$subnav = wp_list_pages('sort_column=menu_order&title_li=&child_of='.$section_ID.'&echo=0');
}
// If the subnav has been built display it
if ($subnav) {
echo $subnav;
}
*/?>