Try using get_posts
instead of get_pages
$pages = get_posts( array(
'order' => 'ASC',
'orderby' => 'ID',
'post_type' => 'page',
'post_status' => 'publish',
) );
Try using get_posts
instead of get_pages
$pages = get_posts( array(
'order' => 'ASC',
'orderby' => 'ID',
'post_type' => 'page',
'post_status' => 'publish',
) );