I'm by using this code, but it's not pursuing the very first request:

<?php $thePostIdArray = array( '2', '4', '5'); ?>
        <?php $limit = 4; ?>
        <?php if (have_posts()) : ?>
        <?php while (have_posts()) : the_post(); $counter++; ?>
        <?php if ( $counter < $limit+1): ?>
        <div class="post" id="post-<?php the_ID(); ?>">
            <?php $post_id = $thePostIdArray[$counter-1]; ?>
            <?php $queried_post = get_post($post_id); ?>
            <?php $title =$queried_post->post_title; ?>
            <?php $content = $queried_post->post_content; ?>
            <h2><span><?php echo $title ?></span></h2>
            <?php echo $content; ?> </div>
        <?php endif; ?>
        <?php endwhile; ?>
            <?php wp_reset_query(); ?>
    <?php endif; ?>

It is simply out putting page one(2) from the request despite the fact that the footer and also the sidebar are been queried. I get rid of the sidebar and also the footer, but no change so the issue is not from their store. Any help here is going to be appreciated. Incidentally I'm while using survived wordpress

You do not need The Loop because you be aware of IDs from the posts (or pages).

<?php 
$thePostIdArray = array( '2', '4', '5');
foreach ($thePostIdArray as $thePostId):
    $thePost = get_post($thePostId);
    <?php if (!empty ($thePost)): ?>
        <div class="post" id="post-<?php echo $thePostId; ?>">
            <?php $title =$thePost->post_title; ?>
            <?php $content = $thePost->post_content; ?>
            <h2><span><?php echo title ?></span></h2>
            <?php echo $content; ?> </div>
        <?php endif;
endforeach; ?>