Title: Double posting when using custom template
Last modified: August 19, 2016

---

# Double posting when using custom template

 *  [big blue 802](https://wordpress.org/support/users/big-blue-802/)
 * (@big-blue-802)
 * [15 years, 9 months ago](https://wordpress.org/support/topic/double-posting-when-using-custom-template/)
 * I’m having trouble figuring out how to make a Page that simply displays a loop
   without it double-posting. I’m not sure what the best way to do this is… custom
   template that is stripped clean and write the loop on the Page itself, or the
   other way around. I’m getting undesirable results with either method. If I could
   get some insight as to why I’m getting a “double post” when I use the default
   template and have only this on my page, I get the content printed twice. Here’s
   what’s on my Page:
 *     ```
       <?php query_posts($query_string . '&cat=10&posts_per_page=5'); ?>
       			     	<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
       			  		<h3><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
       					<p><?php the_content(__('<span class="moretag">More...</span>')); ?></p><br />
       					<?php endwhile; else: ?>
       					<p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
       					<?php endif; ?>
       ```
   
 * Then I get this:
 * [http://landofathousandrobots.com/WordPress/city-news-archives-page/](http://landofathousandrobots.com/WordPress/city-news-archives-page/)
 * How do I get the the 3 headings and their content, and not the repeated content
   below it? I just can’t figure it out. Help is greatly appreciated.

Viewing 1 replies (of 1 total)

 *  Thread Starter [big blue 802](https://wordpress.org/support/users/big-blue-802/)
 * (@big-blue-802)
 * [15 years, 9 months ago](https://wordpress.org/support/topic/double-posting-when-using-custom-template/#post-1617276)
 * I should add that this is what my Default Page (page.php) looks like.
 *     ```
       <?php get_header(); ?>
       <br /><br />
       			<?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
       						<?php the_content(); ?><br />
       						<?php wp_link_pages( array( 'before' => '' . __( 'Pages:', 'twentyten' ), 'after' => '' ) ); ?>
       						<?php edit_post_link( __( 'Edit', 'twentyten' ), '', '' ); ?> 			
   
       <?php endwhile; ?>
       <?php get_footer(); ?>
       ```
   

Viewing 1 replies (of 1 total)

The topic ‘Double posting when using custom template’ is closed to new replies.

## Tags

 * [Page loop](https://wordpress.org/support/topic-tag/page-loop/)
 * [page template](https://wordpress.org/support/topic-tag/page-template/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 1 participant
 * Last reply from: [big blue 802](https://wordpress.org/support/users/big-blue-802/)
 * Last activity: [15 years, 9 months ago](https://wordpress.org/support/topic/double-posting-when-using-custom-template/#post-1617276)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
