Title: query post command query
Last modified: August 19, 2016

---

# query post command query

 *  Resolved [raddy59](https://wordpress.org/support/users/raddy59/)
 * (@raddy59)
 * [15 years, 5 months ago](https://wordpress.org/support/topic/query-post-command-query/)
 * <?php
    get_header(); query_posts(‘category_name=Editors Choice’, ‘posts_per_page
   =1’); ?>
 * Can anyone tell me why am I picking up more than 1 post with the above?

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

 *  [Michael](https://wordpress.org/support/users/alchymyth/)
 * (@alchymyth)
 * [15 years, 5 months ago](https://wordpress.org/support/topic/query-post-command-query/#post-1865032)
 *     ```
       <?php
       get_header();
       query_posts('category_name=editors-choice&posts_per_page=1');
       ?>
       ```
   
 * the paramters are concatenated with the `&` character;
 * also:
 * > category_name (string) – use category slug (NOT name).
 * [http://codex.wordpress.org/Function_Reference/query_posts#Category_Parameters](http://codex.wordpress.org/Function_Reference/query_posts#Category_Parameters)
 * [http://codex.wordpress.org/Function_Reference/query_posts](http://codex.wordpress.org/Function_Reference/query_posts)
 *  Thread Starter [raddy59](https://wordpress.org/support/users/raddy59/)
 * (@raddy59)
 * [15 years, 5 months ago](https://wordpress.org/support/topic/query-post-command-query/#post-1865098)
 * alchymath
    Tried that – didn’t work
 *  Thread Starter [raddy59](https://wordpress.org/support/users/raddy59/)
 * (@raddy59)
 * [15 years, 5 months ago](https://wordpress.org/support/topic/query-post-command-query/#post-1865102)
 * Stet that – it did work. I have another related problem posted later

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

The topic ‘query post command query’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 2 participants
 * Last reply from: [raddy59](https://wordpress.org/support/users/raddy59/)
 * Last activity: [15 years, 5 months ago](https://wordpress.org/support/topic/query-post-command-query/#post-1865102)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
