navigation link based on custom field

Check out get_next_post_sort and get_previous_post_sort filters. You can modify the ORDER BY clause to whatever you want (including ). For example, if you want to sort the ‘next post’ to be the post with the smallest adjacent post ID:

function wp28041_get_next_post_sort($where){
    return 'ORDER BY ID ASC LIMIT 1';
}
add_filter('get_next_post_sort', 'wp28041_get_next_post_sort');

You don’t have to replace the entire thing, you can also add to it. For example if you’d like to add a second ordering parameter, you can:

function wp28042_get_next_post_sort($where){
    return str_replace('LIMIT 1',  ', ID ASC LIMIT 1', $where);
}
add_filter('get_next_post_sort', 'wp28042_get_next_post_sort');