Title: Multiple continuous WP_Queries?
Last modified: August 21, 2016

---

# Multiple continuous WP_Queries?

 *  Resolved [roniel](https://wordpress.org/support/users/roniel/)
 * (@roniel)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/multiple-continuous-wp_queries/)
 * Is there a way to have WP_Query take in arguments that would allow you to query
   the latest 4 posts, for example, in one div and then the next 4 in another div?
 * I need this behavior for a slider. If not, what are some alternatives?

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

 *  [catacaustic](https://wordpress.org/support/users/catacaustic/)
 * (@catacaustic)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/multiple-continuous-wp_queries/#post-4739872)
 * I wouldn’t use WP_Query as that will over-write the query for the current page/
   post/etc.
 * Instead I’d use the [get_posts()](https://codex.wordpress.org/Template_Tags/get_posts)
   function and query the database directly using that.
 *  Thread Starter [roniel](https://wordpress.org/support/users/roniel/)
 * (@roniel)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/multiple-continuous-wp_queries/#post-4739874)
 * Fair enough. What arguments would you give get_posts() if you wanted posts 1-
   4 in one div and posts 5-8 in another?
 *  [catacaustic](https://wordpress.org/support/users/catacaustic/)
 * (@catacaustic)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/multiple-continuous-wp_queries/#post-4739877)
 * Something like this…
 *     ```
       $col_1 = get_posts (array (
           "numberposts" => 4,
           "orderby" => "post_date",
           "order" => "DESC"
       ));
   
       $col_2 = get_posts (array (
           "numberposts" => 4,
           "offset" => 4,
           "orderby" => "post_date",
           "order" => "DESC"
       ));
       ```
   
 * That’s not etested, so you might have to play around with the settings a bit.
 *  Thread Starter [roniel](https://wordpress.org/support/users/roniel/)
 * (@roniel)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/multiple-continuous-wp_queries/#post-4739959)
 * Yeah the offset argument works! Thank you so much!
 *  [catacaustic](https://wordpress.org/support/users/catacaustic/)
 * (@catacaustic)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/multiple-continuous-wp_queries/#post-4739960)
 * This is when I should mention that you really should take the time to look through
   the codes page that I linked to before, and that way you’ll be able ot see what
   this function can do for yourself. The codex is a great source of info, and can
   easily answer questions like this.

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

The topic ‘Multiple continuous WP_Queries?’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 5 replies
 * 2 participants
 * Last reply from: [catacaustic](https://wordpress.org/support/users/catacaustic/)
 * Last activity: [12 years, 1 month ago](https://wordpress.org/support/topic/multiple-continuous-wp_queries/#post-4739960)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
