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:
https://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.
- The topic ‘Double posting when using custom template’ is closed to new replies.