I upvoted @MattKey's answer because the back-end configurable menu system is a good way to deal with things like this, and also keeps the menus editable from the back-end.
However... that answer does not directly answer the question of how you would do this based on the page structure alone. The answer I came up with is a custom Walker for wp_list_pages
.
class No_Top_Link_Walker extends Walker_Page {
static $parent = false;
function start_lvl( &$output, $depth = 0, $args = array() ) {
$indent = str_repeat("\t", $depth);
$output .= "\n$indent%s<ul class='children'>\n";
}
function start_el( &$output, $page, $depth, $args, $current_page = 0 ) {
if ( $depth ) {
$indent = str_repeat("\t", $depth);
} else {
$indent = '';
}
extract($args, EXTR_SKIP);
$css_class = array('page_item', 'page-item-'.$page->ID);
if ( !empty($current_page) ) {
$_current_page = get_post( $current_page );
if ( in_array( $page->ID, $_current_page->ancestors ) )
$css_class[] = 'current_page_ancestor';
if ( $page->ID == $current_page )
$css_class[] = 'current_page_item';
elseif ( $_current_page && $page->ID == $_current_page->post_parent )
$css_class[] = 'current_page_parent';
} elseif ( $page->ID == get_option('page_for_posts') ) {
$css_class[] = 'current_page_parent';
}
$css_class = implode( ' ', apply_filters( 'page_css_class', $css_class, $page, $depth, $args, $current_page ) );
$href = (0 === $depth && $args['has_children']) ? '%s' : get_permalink($page->ID);
$tli = '';
if (false !== static::$parent) {
$tli = sprintf(static::$parent,get_permalink($page->ID));
static::$parent = false;
}
$output = sprintf($output,$tli);
$li = $indent . '<li class="' . $css_class . '"><a href="' . $href . '">' . $link_before . apply_filters( 'the_title', $page->post_title, $page->ID ) . $link_after . '</a>';
if ( !empty($show_date) ) {
if ( 'modified' == $show_date )
$time = $page->post_modified;
else
$time = $page->post_date;
$li .= " " . mysql2date($date_format, $time);
}
if (0 === $depth && $args['has_children']) {
static::$parent = $li;
} else {
$output .= $li;
}
}
function end_el( &$output, $page, $depth = 0, $args = array() ) {
if (false === static::$parent) {
$output .= "</li>\n";
}
}
}
$args = array(
'walker' => new No_Top_Link_Walker,
'title_li' => 'Pages'
);
echo '<ul>';
wp_list_pages($args);
echo '</ul>';
The walker extends Walker_Page
and replaces several methods. The code above is essentially a copy of that walker's methods except where where I had make changes, not counting some trivial formatting and syntax changes.
The walker doesn't know what the child URL is until it gets there so I saved the markup for the top level menus without children and inserted them before beginning the markup for the child.
I have tested it a bit during development and it appears to work and validator.w3.org gives it a "green". However, no promises. I just made it up.