Title: query page using include didnt work
Last modified: August 20, 2016

---

# query page using include didnt work

 *  Resolved [pointsense](https://wordpress.org/support/users/pointsense/)
 * (@pointsense)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/query-page-using-include-didnt-work/)
 * hello friend
    right now i need to fecth only 4 page post in my wordpress site,
   this 4 page is only show at the footer as 4 coulumn with thumbnail exist. So 
   every page open, this 4 coulumn should still remain to display that 4 page.
 * i have try using query_posts like this
 *     ```
       <?php
       			$args = Array(
       				'posts_per_page'=>4,
       				'post_type'	=>'page',
       				'include' => 32,30,28,34,
       				);?>
       			<?php query_posts($args); ?>
       			<?php if (have_posts()) while (have_posts()) : the_post(); ?>
       				<div class="b4">
       				<h2 class="h_bot"><a href="<?php the_permalink() ?>"><?php the_title();?></a></h2>
       				<div class="b4_thumb"><?php get_the_image( array( 'meta_key' => array( 'Thumbnail', 'thumbnail' ), 'size' => 'medium' ) ); ?></div>
       				<p><?php the_excerpt(); ?></p>
       				</div>
   
       			<?php endwhile;wp_reset_query();?>
       ```
   
 * the result was fine, i can get 4 page but the problem its only show the latest
   page :(, so everytime there is new page created, the new page will show on the
   footer, seems i’m missing something on “include” parameter ,
    any idea how to
   using include for the spefific page id : ‘include’ => 32,30,28,34,
 * thanks

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [Michael](https://wordpress.org/support/users/alchymyth/)
 * (@alchymyth)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/query-page-using-include-didnt-work/#post-2434306)
 * try to use
    `'post__in' => array(32,30,28,34),` instead of `'include' => 32,30,28,34,`
 * [http://codex.wordpress.org/Class_Reference/WP_Query#Post_.26_Page_Parameters](http://codex.wordpress.org/Class_Reference/WP_Query#Post_.26_Page_Parameters)
 * > Multiple Posts/Pages Handling
   > Display only the specify posts:
   > `$query = new WP_Query( array( 'post__in' => array( 2, 5, 12, 14, 20 ) ) );`
 *  Thread Starter [pointsense](https://wordpress.org/support/users/pointsense/)
 * (@pointsense)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/query-page-using-include-didnt-work/#post-2434320)
 * Hello #alchymyth
    this is work now :D, thanks for your reference url.

Viewing 2 replies - 1 through 2 (of 2 total)

 The topic ‘query page using include didnt work’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [pointsense](https://wordpress.org/support/users/pointsense/)
 * Last activity: [14 years, 10 months ago](https://wordpress.org/support/topic/query-page-using-include-didnt-work/#post-2434320)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
