Title: reset query_posts
Last modified: August 19, 2016

---

# reset query_posts

 *  [gulflee](https://wordpress.org/support/users/gulflee/)
 * (@gulflee)
 * [17 years, 10 months ago](https://wordpress.org/support/topic/reset-query_posts-1/)
 * hi is there any way to get this loop reset??
    i m trying to run this loop
 * – get_post_meta($post->ID, ‘side’, true);
    then
 *     ```
       <?php $myposts = query_posts("cat=10");
       foreach($myposts as $post) : ?>
       <li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li>
       <?php endforeach; ?>
       ```
   
 * -then get_post_meta($post->ID, ‘slideshow’, true);
    -then another
 *     ```
       <?php $myposts = query_posts("cat=10");
       foreach($myposts as $post) : ?>
       <li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li>
       <?php endforeach; ?>
       ```
   
 * but it seems not working when the get_post_meta() run after the
 * > foreach loop
 * is there anyway to reset or ……
 * tq

The topic ‘reset query_posts’ is closed to new replies.

## Tags

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

 * 0 replies
 * 1 participant
 * Last reply from: [gulflee](https://wordpress.org/support/users/gulflee/)
 * Last activity: [17 years, 10 months ago](https://wordpress.org/support/topic/reset-query_posts-1/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
