After days of working on this, I was able to loop through the results of wp_list_pages
to customize the menu the way I needed.
<?php
if(count(get_post_ancestors($post->ID)) == 1 ) {
echo '<ul>';
$args = array(
'post_type' => 'page',
'post_status' => 'publish',
'posts_per_page' => -1,
'post_parent' => $post->post_parent,
);
$query = new WP_Query($args);
while ($query->have_posts()) {
$query->the_post();
$child = get_pages('child_of=".$post->ID);
if( count( $child ) != 0 ) : ?>
<li class="has-children"><span><?php the_title(); ?></span>
<?php $children = wp_list_pages( "title_li=&child_of=".$post->ID."&echo=0' );
if ( $children) : ?>
<ul class="children">
<li <?php if(is_page($post->ID )) {?> class="current_page_item" <?php }?> ><a href="https://wordpress.stackexchange.com/questions/235197/<?php the_permalink(); ?>">Overview</a></li>
<?php echo $children; ?>
</ul>
<?php endif; ?>
</li>
<?php else : ?>
<li <?php if(is_page($post->ID )) {?> class="current_page_item" <?php }?>><a href="https://wordpress.stackexchange.com/questions/235197/<?php the_permalink(); ?>"><?php the_title(); ?></a>
<?php endif;
}
echo '</ul>';
}
elseif (count(get_post_ancestors($post->ID)) == 2 ) {
echo '<ul>';
$args = array(
'post_type' => 'page',
'post_status' => 'publish',
'posts_per_page' => -1,
'post_parent' => get_post( $post->post_parent )->post_parent,
'depth' => 1,
);
$query = new WP_Query($args);
while ($query->have_posts()) {
$query->the_post();
$child = get_pages('child_of=".$post->ID);
if( count( $child ) != 0 ) : ?>
<li class="has-children"><span><?php the_title(); ?></span>
<?php $children = wp_list_pages( "title_li=&child_of=".$post->ID."&echo=0' );
if ( $children) : ?>
<ul class="children">
<li <?php if(is_page($post->ID )) {?> class="current_page_item" <?php }?>><a href="https://wordpress.stackexchange.com/questions/235197/<?php the_permalink(); ?>">Overview</a></li>
<?php echo $children; ?>
</ul>
<?php endif; ?>
</li>
<?php else : ?>
<li <?php if(is_page($post->ID )) {?> class="current_page_item" <?php }?>><a href="https://wordpress.stackexchange.com/questions/235197/<?php the_permalink(); ?>"><?php the_title(); ?></a>
<?php endif;
}
echo '</ul>';
}
wp_reset_postdata();
?>