title: wordpress custom page template displaying posts twice
body: <p>I'm not a wordpress expert, so wondering if someone can help me.  I created a custom page template for one page so I could aggregate and display posts from one category on that page.  However, I created one post in that category so far, but it gets displayed twice on the page.  The posts that get pulled in from the category get displayed in the "div id=main" div.  Here is the page template code:</p>
  
  <pre><code>&lt;?php /* Template Name: Deals Page */ ?&gt;
  &lt;?php get_header(); ?&gt;
  
  &lt;/div&gt;
  //&lt;?php while ( have_posts() ) : the_post(); ?&gt;
  &lt;div id="title-bar"&gt;
      &lt;h1 class="bar-entry-title container"&gt;&lt;?php the_title(); ?&gt;&lt;/h1&gt;
  &lt;/div&gt;  
  &lt;?php endwhile; ?&gt;  
  &lt;div class="container col-md-12"&gt;&lt;!-- restart previous section--&gt;
  
  &lt;div id="primary" class="content-area col-md-8"&gt;
      &lt;main id="main" class="site-main" role="main"&gt;
  
  
  
                    &lt;?php query_posts('category_name=deals &amp;posts_per_page=20'); ?&gt;
          &lt;?php while ( have_posts() ) : the_post(); ?&gt;
                               &lt;?php the_title( '&lt;h2&gt;', '&lt;/h2&gt;' ); ?&gt;
                                &lt;?php the_content(); ?&gt;
              //&lt;?php get_template_part( 'content', 'page' ); ?&gt;
  
  
  
          &lt;?php endwhile; // end of the loop. ?&gt;
                   &lt;?php
                  // If comments are open or we have at least one comment, load up the comment template
                  if ( comments_open() || '0' != get_comments_number() )
                      comments_template();
              ?&gt;
  
      &lt;/main&gt;&lt;!-- #main --&gt;
  &lt;/div&gt;&lt;!-- #primary --&gt;
  
  &lt;?php get_sidebar(); ?&gt;
  &lt;?php get_sidebar('footer'); ?&gt;
  &lt;?php get_footer(); ?&gt;
  </code></pre>
  
  <p>Do you know why it is displaying the post twice?  I can't see why.</p>