Title: Using query_post ()
Last modified: August 21, 2016

---

# Using query_post ()

 *  [gbivingsDC](https://wordpress.org/support/users/gbivingsdc/)
 * (@gbivingsdc)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/using-query_post/)
 * I’m placing a selection of 3 blog posts on a simple page, and want only those
   posts from category 15 or 16. I’m able to select category 15 or 16 by itself,
   but not together.
 * I’ve tried category_in and category_and and various other combinations but no
   luck. If I don’t select just one category, then all categories show on the page.
 * This should be simple, but no matter what I try it won’t work. Thanks in advance.
 * ‘<?php
    $paged = (get_query_var(‘paged’)) ? get_query_var(‘paged’) : 1; $args
   = array( ‘category_and’ => array(15,16), ‘posts_per_page’ => 3, ‘paged’ => $paged);
   query_posts($args); ?>’
 * The Loop and reset

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

 *  [Dave Naylor](https://wordpress.org/support/users/wpranger/)
 * (@wpranger)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/using-query_post/#post-4749545)
 * Looks like you’re using `category_and` rather than `category__and`
 *  Thread Starter [gbivingsDC](https://wordpress.org/support/users/gbivingsdc/)
 * (@gbivingsdc)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/using-query_post/#post-4749559)
 * When I tried that (and tried it again) I get the error message “Nothing Found”?

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

The topic ‘Using query_post ()’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [gbivingsDC](https://wordpress.org/support/users/gbivingsdc/)
 * Last activity: [12 years, 1 month ago](https://wordpress.org/support/topic/using-query_post/#post-4749559)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
