title: Two loops, exclude post from first loop in second loop
body: <p>I have a wordpress page which has two loops like so...</p>
  
  <pre><code>&lt;?php 
  global $post;
  $args = array(
      'showposts'        =&gt; 1,
      'category_name'    =&gt; 'videos',
      'meta_key'         =&gt; 'feature-image',
  );
  
  $myposts = get_posts($args);  
  foreach( $myposts as $post ) :  setup_postdata($post);
  $exclude_featured = $post-&gt;ID;
  ?&gt;
  &lt;span class="featured"&gt;
  &lt;?php the_title(); ?&gt;
  &lt;/span&gt;
  &lt;?php endforeach; ?&gt;
  
  &lt;?php while ( have_posts() ) : the_post(); ?&gt;
  &lt;?php the_title(); ?&gt;
  &lt;?php endwhile; ?&gt;
  </code></pre>
  
  <p>Now I need to use $exclude_featured in my second loop some how to exclude that post from that loop. I've tried a few implementations but none of them have worked. I have tried adding the following above the while statement for the second loop...</p>
  
  <pre><code>global $query_string;
  query_posts( $query_string . '&amp;exclude='.$exclude_featured );
  </code></pre>
  
  <p>and this...</p>
  
  <pre><code>global $wp_query;
  $args = array_merge( $wp_query-&gt;query_vars, array( 'exclude' =&gt; $exclude_featured ) );
  query_posts( $args );
  </code></pre>
  
  <p>.. and have had no luck. I've noticed that by using either of these two snippets they also render my pre_get_posts function which sets the number of posts to display useless.</p>
  
  <p>Any help would be appreciated</p>
  
  <p>EDIT:</p>
  
  <p>I've tried adding the following lines before the <code>while</code> statement on the second loop..</p>
  
  <pre><code>global $wp_query;
  $args = array_merge( $wp_query-&gt;query_vars, array( 'post__not_in' =&gt; $exclude_featured ) );
  query_posts( $args );
  </code></pre>
  
  <p>However I still have not had any success, it brings up the following error:</p>
  
  <blockquote>
    <p>Warning: array_map() [function.array-map]: Argument #2 should be an
    array in
    /home/myuser/public_html/mysitedirectory/wp-includes/query.php on line
    2162</p>
    
    <p>Warning: implode() [function.implode]: Invalid arguments passed in
    /home/myuser/public_html/mysitedirectory/wp-includes/query.php on line
    2162</p>
  </blockquote>