Title: Query posts
Last modified: August 19, 2016

---

# Query posts

 *  Resolved [matttail](https://wordpress.org/support/users/matttail/)
 * (@matttail)
 * [17 years, 10 months ago](https://wordpress.org/support/topic/query-posts-2-2/)
 * I’m wondering if it’s possible to, in my template, call a specific entry and 
   then on the same page call a specific category?
 * For the main page of my site I’d like to have a welcome post and then after that
   show posts from the news category. I tried
 *     ```
       <?php
       // retrieve welcome entry
       query_posts('p=3');
       query_posts('cat=6');
       ?>
       ```
   
 * but that only shows the category and does some funky things to my layout. Any
   help is appreciated.
 * -Matt

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

 *  Thread Starter [matttail](https://wordpress.org/support/users/matttail/)
 * (@matttail)
 * [17 years, 10 months ago](https://wordpress.org/support/topic/query-posts-2-2/#post-797770)
 * So I tried both
    `query_posts('p=3&cat=6');` and `query_posts('p=3+cat=6');`
 * Both of which display the post, but not the category. Is there any way to accomplish
   this?
 * Thanks!
 * –Matt
 *  Thread Starter [matttail](https://wordpress.org/support/users/matttail/)
 * (@matttail)
 * [17 years, 10 months ago](https://wordpress.org/support/topic/query-posts-2-2/#post-797950)
 * I got this figured out while asking a different question. Basically you have 
   to use multiple loops and a new query object. See this article for example. [http://codex.wordpress.org/The_Loop#Multiple_Loops_Example_1](http://codex.wordpress.org/The_Loop#Multiple_Loops_Example_1)

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

The topic ‘Query posts’ is closed to new replies.

 * 2 replies
 * 1 participant
 * Last reply from: [matttail](https://wordpress.org/support/users/matttail/)
 * Last activity: [17 years, 10 months ago](https://wordpress.org/support/topic/query-posts-2-2/#post-797950)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
