Title: Keep the &#8220;original&#8221; Loop while using multiple Loops
Last modified: August 18, 2016

---

# Keep the “original” Loop while using multiple Loops

 *  [Morris](https://wordpress.org/support/users/morris/)
 * (@morris)
 * [19 years, 8 months ago](https://wordpress.org/support/topic/keep-the-original-loop-while-using-multiple-loops/)
 * By now, i know about half a dozen ways to realize multiple loops. But i haven’t
   managed to keep the “orinial” (the one with the content which should be on the
   site) loop for the site.
 * How is it possible to recall the “original” loop after calling “special” loops
   before with code e.g.
 * <?php $posts = get_posts(‘category=1&numberposts=1’); ?>
    or <?php query_posts(‘
   cat=1&showposts=1’); ?> or <?php $my_query = new WP_Query(‘cat=1&showposts=1);
   >
 * In my special case i have 4 “special” loops before and 2 after the position where
   the “otiginal” loop should be displayed.
 * Has someone a solution or a hint for me?
 * Thx
    Mo
 * PS: the search only shows me the some ten posts every time i click “next”…so 
   it is not really helpfull for me 🙁

Viewing 1 replies (of 1 total)

 *  [Kafkaesqui](https://wordpress.org/support/users/kafkaesqui/)
 * (@kafkaesqui)
 * [19 years, 8 months ago](https://wordpress.org/support/topic/keep-the-original-loop-while-using-multiple-loops/#post-467645)
 * On your first custom loop, avoid using $posts (call it $my_posts or $cat_one_posts
   or whatever). $posts is a special variable, actually an object, in WordPress 
   which holds the default posts from your “original” loop, and you’re whacking 
   this when assigning it to a get_posts() call.
 * On the second I can’t help. query_posts() really should only be used to reset
   The Loop (i.e. the “original”).
 * And the final custom loop should not interfere with the default post loop. Passing
   a whole new WP_Query class (to a different var from $posts) bypasses it completely.
 * EDIT: Removed a bit here; misread your PS.

Viewing 1 replies (of 1 total)

The topic ‘Keep the “original” Loop while using multiple Loops’ is closed to new
replies.

## Tags

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

 * 1 reply
 * 2 participants
 * Last reply from: [Kafkaesqui](https://wordpress.org/support/users/kafkaesqui/)
 * Last activity: [19 years, 8 months ago](https://wordpress.org/support/topic/keep-the-original-loop-while-using-multiple-loops/#post-467645)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
