<?php $thePostIdArray = array("28","74", "82", "92"); // Post IDS $limit = 4 if (have_posts()) : while (have_posts()) : the_post(); $counter++; if ( $counter < $limit + 1 ): $post_id = $thePostIdArray[$counter-1]; $queried_post = get_post($post_id); echo $queried_post->post_title; endif; endwhile; endif; ?>