Title: WP_Query
Last modified: August 21, 2016

---

# WP_Query

 *  [Palagrin](https://wordpress.org/support/users/palagrin/)
 * (@palagrin)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/wp_query-8/)
 * EDIT: realised I’ve posted this in the wrong area. Can someone move it to hacks?
 * I’ve got this code in my theme to pull the featured images of the 5 most recent
   posts of a custom post type (‘reviews).
 *     ```
       <?php $the_query = new WP_Query('post_type=reviews&showposts=5&orderby=date&order=desc');
       while ($the_query->have_posts()) : $the_query->the_post(); ?>
       <a title="<?php the_title(); ?>" href="<?php the_permalink() ?>" rel="bookmark"><?php the_post_thumbnail('index-book', array ('class' => 'alignleft')); ?></a>
       <?php endwhile; ?>
       <?php wp_reset_query(); ?>
       ```
   
 * But what I really want to do is show just 5 to start with and then enable an 
   expanding “load more” which will then load 5 more underneath. How would I go 
   about doing this?

The topic ‘WP_Query’ is closed to new replies.

## Tags

 * [expand](https://wordpress.org/support/topic-tag/expand/)
 * [load more](https://wordpress.org/support/topic-tag/load-more/)
 * [wp_query](https://wordpress.org/support/topic-tag/wp_query/)

 * 0 replies
 * 1 participant
 * Last reply from: [Palagrin](https://wordpress.org/support/users/palagrin/)
 * Last activity: [12 years, 5 months ago](https://wordpress.org/support/topic/wp_query-8/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
