title: Take Post ID from one loop and exclude that post from the other loop
body: <p>I am trying to exclude the post from the second loop which are already shown in the first one.</p>
  
  <p>I have a page template created to display newest one Custom Post named "inspirations".</p>
  
  <p>I created a widget to display the other posts from the same post type and used that widget on the page template I created.</p>
  
  <p>Here is the code of the Page Template:</p>
  
  <pre><code>&lt;?php
  /**
   * Template Name: Inspiratie
   *
   * A custom page template without sidebar.
   *
   * The "Template Name:" bit above allows this to be selectable
   * from a dropdown menu on the edit page screen.
   */
  get_header(); ?&gt;
  &lt;div id="container" class="seprator"&gt;
    &lt;div id="content" class="inspiratie-area" role="main"&gt;
      &lt;?php $inspiratiepage_query = new WP_Query('showposts=1&amp;post_type=inspirations');  ?&gt;
      &lt;?php while ($inspiratiepage_query-&gt;have_posts()) : $inspiratiepage_query-&gt;the_post(); ?&gt;
      &lt;div class="inspiratie-box" id="inspiratie-&lt;?php the_ID(); ?&gt;"&gt;
        &lt;h2 class="entry-title orange"&gt;
          &lt;?php the_title(); ?&gt;
        &lt;/h2&gt;
        &lt;?php the_content() ?&gt;
        &lt;div class="clear"&gt;&lt;/div&gt;
      &lt;/div&gt;
      &lt;?php endwhile; // end of the loop. ?&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;?php get_footer(); ?&gt;
  </code></pre>
  
  <p>below is the code of my widget I created:</p>
  
  <pre><code>class Meer_Inspiratie extends WP_Widget {
      function Meer_Inspiratie() {
          $widget_ops = array('classname' =&gt; 'Meer_Inspiratie', 'description' =&gt; 'Display Inspiratie Posts' );
          $this-&gt;WP_Widget('Meer_Inspiratie', 'Inspiratie Post Widget', $widget_ops);
      }
  
      function widget($args, $instance) {
          extract($args, EXTR_SKIP);
  
          echo $before_widget;
          $title = $instance['title'];
          $items = $instance['items'];
  
          if(!empty($title))
          {
              echo $before_title;
                  echo $title;
              echo $after_title;
          }
  
          if(!empty($items))
          { ?&gt;
              &lt;?php 
  
              $inspiratie_query = new WP_Query(   array(
                                      'post_type' =&gt; 'inspirations',
                                      'posts_per_page' =&gt;  $items,
                                    'post__not_in'   =&gt; array(1),
                                      )
                                  );  ?&gt;
  
              &lt;?php while ($inspiratie_query-&gt;have_posts()) : $inspiratie_query-&gt;the_post(); ?&gt;
                  &lt;div class="inspiratie_query"&gt;
                      &lt;p class="inspiratie_txt"&gt;&lt;?php the_excerpt() ?&gt;&lt;/p&gt;
                      &lt;div class="inspiratie_img"&gt;
                          &lt;?php if ( has_post_thumbnail() ) { the_post_thumbnail('inspiratie-product-thumb');}?&gt;
                      &lt;/div&gt;
                      &lt;div class="inspiratie_quote"&gt;
                          &lt;?php
                              echo '&lt;blockquote class="inspiratie-quote"&gt;';
                              echo get_post_meta( get_the_ID(), 'my_specs_box_quote', true );
                              echo '&lt;/blockquote&gt;';
                          ?&gt;
                      &lt;/div&gt;
                      &lt;div class="clear"&gt;&lt;/div&gt;
                      &lt;a class="more-post" href="&lt;?php the_permalink()?&gt;"&gt;Lees meer&lt;/a&gt;
                  &lt;/div&gt;
  
              &lt;?php endwhile; // end of the loop. ?&gt;
  
          &lt;?php }
  
          echo $after_widget;
      }
  
      function update($new_instance, $old_instance) {
          $instance = $old_instance;
          $instance['items'] = strip_tags($new_instance['items']);
          $instance['title'] = $new_instance['title'];
  
          return $instance;
      }
  
      function form($instance) {
          $instance = wp_parse_args( (array) $instance, array( 'items' =&gt; '', 'title' =&gt; '') );
          $items = strip_tags($instance['items']);
          $title = $instance['title'];
  
  ?&gt;      
              &lt;p&gt;&lt;label for="&lt;?php echo $this-&gt;get_field_id('title'); ?&gt;"&gt;Title: &lt;input class="widefat" id="&lt;?php echo $this-&gt;get_field_id('title'); ?&gt;" name="&lt;?php echo $this-&gt;get_field_name('title'); ?&gt;" type="text" value="&lt;?php echo esc_attr($title); ?&gt;" /&gt;&lt;/label&gt;&lt;/p&gt;
  
              &lt;p&gt;&lt;label for="&lt;?php echo $this-&gt;get_field_id('items'); ?&gt;"&gt;No. of Items: &lt;input class="widefat" id="&lt;?php echo $this-&gt;get_field_id('items'); ?&gt;" name="&lt;?php echo $this-&gt;get_field_name('items'); ?&gt;" type="text" value="&lt;?php echo esc_attr($items); ?&gt;" /&gt;&lt;/label&gt;&lt;/p&gt;
  
  &lt;?php
      }
  }
  
  register_widget('Meer_Inspiratie');
  
  /**
  *   End Inspiratie Post Widget
  **/
  </code></pre>
  
  <p>I am trying to exclude the post I have currently in my content area from the widget..</p>
  
  <p>Thank in advance....</p>