build child and anchestor three from post parent

So i got it working, by adding a filter:

i added this before the wp_list_pages

add_filter( 'get_pages', 'check_propper_rank', 10, 2 );
wp_list_pages( array(
   'post_type' => 'wiki-term',
) );

and then created a new filter, to removed the ones that did’nt fit the rank.

function check_propper_rank( $pages, $arguments ) {
    
    $user_rank = 100;
    
    foreach ( $pages as $key => $page ) {
        $required_rank = get_post_meta($page->ID, 'rank', true);
        if ( $required_rank >= $user_rank ) {
            unset($pages[$key]);
        }
    }
    
    if ( empty( $pages ) )
        return $pages;

    // Remove instantly
    remove_filter( current_filter(), __FUNCTION__, 10 );

    return $pages;
}