Title: Query posts problem
Last modified: August 19, 2016

---

# Query posts problem

 *  [bazzle83](https://wordpress.org/support/users/bazzle83/)
 * (@bazzle83)
 * [17 years, 7 months ago](https://wordpress.org/support/topic/query-posts-problem-2/)
 * Hi, hoping someone can help me out with this simple problem.
 * On the sidebar of my site I have a mini loop,
 *     ```
       <?php while (have_posts()) : the_post(); ?>
   
       <?php the_title(); ?>
       <a href='<?php the_permalink() ?>'><?php the_content(); ?></a>
       <?php endwhile; ?>
       ```
   
 * and before that, I have a query post tag.
 * `<?php query_posts('cat=3'); ?>`
 * However, this query posts tag has influence on the main loop on the page aswell.
 * How can I make it query the mini-loop directly underneath it only, and leave 
   the main loop alone.

Viewing 1 replies (of 1 total)

 *  [iridiax](https://wordpress.org/support/users/iridiax/)
 * (@iridiax)
 * [17 years, 7 months ago](https://wordpress.org/support/topic/query-posts-problem-2/#post-841955)
 * [http://codex.wordpress.org/The_Loop#Multiple_Loops](http://codex.wordpress.org/The_Loop#Multiple_Loops)
 * [http://codex.wordpress.org/Template_Tags/query_posts](http://codex.wordpress.org/Template_Tags/query_posts)

Viewing 1 replies (of 1 total)

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [iridiax](https://wordpress.org/support/users/iridiax/)
 * Last activity: [17 years, 7 months ago](https://wordpress.org/support/topic/query-posts-problem-2/#post-841955)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
