You can use get_pages
with a limit of 1:
$pages = get_pages([
'child_of' => $post->post_parent,
'number' => 1,
]);
if ( $pages ) {
$first_page = current( $pages );
}
You can use get_pages
with a limit of 1:
$pages = get_pages([
'child_of' => $post->post_parent,
'number' => 1,
]);
if ( $pages ) {
$first_page = current( $pages );
}