Title: Influence the Loop
Last modified: August 19, 2016

---

# Influence the Loop

 *  Resolved [Symeon Mattes](https://wordpress.org/support/users/simeonmattes/)
 * (@simeonmattes)
 * [15 years, 4 months ago](https://wordpress.org/support/topic/influence-the-loop/)
 * Hi,
 * I have the following problem
 * In my home page I want to display on the header some posts, let’s say with ID
   = 5,10,13,30, and in the content of the page the rest ones.
 * I looked the
    [http://codex.wordpress.org/Function_Reference/query_posts](http://codex.wordpress.org/Function_Reference/query_posts)
 * and I found out that I could exclude the header ids from “The Loop” by using
 * query_posts( array( ‘post__not_in’ => array( 5,10,13,30)));
 * This works fine for the first page without pagination. If I want to show older
   posts, i.e. for [http://home_page/page/(number)](http://home_page/page/(number))
   I receive the same results as the ones of the first page.
 * Thanks in advance

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

 *  [Michael](https://wordpress.org/support/users/alchymyth/)
 * (@alchymyth)
 * [15 years, 4 months ago](https://wordpress.org/support/topic/influence-the-loop/#post-1901310)
 * you probably need to include the original $query_string into your query:
 * [http://codex.wordpress.org/Function_Reference/query_posts#Usage_Note](http://codex.wordpress.org/Function_Reference/query_posts#Usage_Note)
 *     ```
       global $wp_query;
       $args = array_merge( $wp_query->query, array( 'post__not_in' => array( 5,10,13,30)) );
       query_posts( $args );
       ```
   
 *  Thread Starter [Symeon Mattes](https://wordpress.org/support/users/simeonmattes/)
 * (@simeonmattes)
 * [15 years, 4 months ago](https://wordpress.org/support/topic/influence-the-loop/#post-1901347)
 * Ok…thanks…it worked

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

The topic ‘Influence the Loop’ is closed to new replies.

## Tags

 * [exclude](https://wordpress.org/support/topic-tag/exclude/)
 * [pagination](https://wordpress.org/support/topic-tag/pagination/)
 * [the-loop](https://wordpress.org/support/topic-tag/the-loop/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [Symeon Mattes](https://wordpress.org/support/users/simeonmattes/)
 * Last activity: [15 years, 4 months ago](https://wordpress.org/support/topic/influence-the-loop/#post-1901347)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
