Title: Query specific post ID&#039;s Problem
Last modified: August 22, 2016

---

# Query specific post ID's Problem

 *  [robertallen](https://wordpress.org/support/users/robertallen/)
 * (@robertallen)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/query-specific-post-ids-problem/)
 * Hi all, I followed the directions on WordPress’s site regarding querying, and
   I came up with this. For some reason it’s not displaying at all. What am I missing?
 * My goal is to loop a formatted list of only specific post ID’s.
 * Any help would be greatly appreciated.
 *     ```
       <ul>
       <?php
       $home_loop_query = new WP_Query(array('tag__and'=>array( 74,175,174,173,69,62)));
       while($home_loop_query->have_posts()) : $home_loop_query->the_post();
       $thumbnail_src = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), array(), false, '' );
       ?>
       <li style="background: url('<?php echo $thumbnail_src[0]; ?>') no-repeat center center; background-size: cover;">
       <li style="background: url('<?php echo $thumbnail_src[0]; ?>') no-repeat center center / cover;">
   
       <div class="col2-post-content">
       <div class="col2-category">
       <?php $category = get_the_category();
       echo $category[0]->cat_name;
       ?>
       </div>
   
       <h3><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h3>
       </div>
       </li>
       <?php endwhile; ?>
       </ul>
       ```
   

Viewing 1 replies (of 1 total)

 *  Thread Starter [robertallen](https://wordpress.org/support/users/robertallen/)
 * (@robertallen)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/query-specific-post-ids-problem/#post-5545741)
 * I think it’s something with the first line where it’s not grabbing the post ID’s.
   Do I need to use $postID or something in it?

Viewing 1 replies (of 1 total)

The topic ‘Query specific post ID's Problem’ is closed to new replies.

## Tags

 * [loop](https://wordpress.org/support/topic-tag/loop/)
 * [php](https://wordpress.org/support/topic-tag/php/)
 * [query](https://wordpress.org/support/topic-tag/query/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 1 participant
 * Last reply from: [robertallen](https://wordpress.org/support/users/robertallen/)
 * Last activity: [11 years, 6 months ago](https://wordpress.org/support/topic/query-specific-post-ids-problem/#post-5545741)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
