Get a custom field of all posts on current blog page

You could just rewind the query to loop through again:

<?php rewind_posts(); ?>

<?php while ( have_posts() ) : the_post(); ?>
    <p>Post Number: <?php the_ID(); ?></p>
<?php endwhile; ?>

THE LOOP

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)