List children of second level sub page

Is this what you are after?

<?php
    if($post->post_parent) {
        // if $post has parent than it is "Second level" and show its children.
        $children = wp_list_pages("child_of=".$post->post_parent."&echo=0");
    } else {
        // else it's a "Top level" so display children & grand children? 
        $children = wp_list_pages("child_of=".$post->ID."&echo=0");
    }

    if ($children) {
        echo "<ul>$children</ul>";
    }

Source: http://codex.wordpress.org/Function_Reference/wp_list_pages#List_subpages_even_if_on_a_subpage

Leave a Comment