Title: Use query_posts to generate a specified posts list?
Last modified: August 19, 2016

---

# Use query_posts to generate a specified posts list?

 *  Resolved [Sparanoid](https://wordpress.org/support/users/sparanoid/)
 * (@sparanoid)
 * [15 years, 6 months ago](https://wordpress.org/support/topic/use-query_posts-to-get-specified-posts/)
 * Hi all, for some reason, I want to use query_posts to get a posts list for specified
   posts, they filed under different categories, different tags and authors, I tried`
   p=` parameter like `p=1,12,34,90,120` but it doesn’t work, anybody know how to
   do it?

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

 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [15 years, 6 months ago](https://wordpress.org/support/topic/use-query_posts-to-get-specified-posts/#post-1782761)
 * [http://codex.wordpress.org/Function_Reference/query_posts](http://codex.wordpress.org/Function_Reference/query_posts)
 *  Thread Starter [Sparanoid](https://wordpress.org/support/users/sparanoid/)
 * (@sparanoid)
 * [15 years, 6 months ago](https://wordpress.org/support/topic/use-query_posts-to-get-specified-posts/#post-1782765)
 * yes, I checked this document and my code is like:
 *     ```
       <?php query_posts('p=1670,147,584,1516,1590,433,363,46');
       if (have_posts()) : while (have_posts()) : the_post(); ?>
       ```
   
 * but it doesn’t work. I said they filed under different categories, different 
   tags and authors, I cannot use parameter such as `cat=` to get the exact posts
   I want. so any good idea?
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [15 years, 6 months ago](https://wordpress.org/support/topic/use-query_posts-to-get-specified-posts/#post-1782771)
 * Re-read [this section](http://codex.wordpress.org/Function_Reference/query_posts#Post_.26_Page_Parameters).
 *  Thread Starter [Sparanoid](https://wordpress.org/support/users/sparanoid/)
 * (@sparanoid)
 * [15 years, 6 months ago](https://wordpress.org/support/topic/use-query_posts-to-get-specified-posts/#post-1782778)
 * Ha, I got it, sorry for my carelessness.

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

The topic ‘Use query_posts to generate a specified posts list?’ is closed to new
replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 4 replies
 * 2 participants
 * Last reply from: [Sparanoid](https://wordpress.org/support/users/sparanoid/)
 * Last activity: [15 years, 6 months ago](https://wordpress.org/support/topic/use-query_posts-to-get-specified-posts/#post-1782778)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
