Title: Stop posts loop and start page content loop
Last modified: August 19, 2016

---

# Stop posts loop and start page content loop

 *  Resolved [nicoliver](https://wordpress.org/support/users/nicoliver/)
 * (@nicoliver)
 * [16 years, 7 months ago](https://wordpress.org/support/topic/stop-posts-loop-and-start-page-content-loop/)
 * Hi,
 * I have created a custom page template in WP.
    Within this page I have created
   a query that displays all posts from a specific category. What I would now like
   to do is place the original page content + comments at the bottom.
 * For some reason it is showing the titles from the previous query loop.
    This 
   is the page: [http://dinky.nicholasoliver.co.uk/](http://dinky.nicholasoliver.co.uk/)
 * I have tried a few various options like wp_reset_query and defining parameters
   for a new loop but none seem to work.
 * Does anyone have a suggestion on how I might go about stopping the first loop
   and then loading the pages content?
 * thanks

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [MichaelH](https://wordpress.org/support/users/michaelh/)
 * (@michaelh)
 * [16 years, 7 months ago](https://wordpress.org/support/topic/stop-posts-loop-and-start-page-content-loop/#post-1251242)
 *     ```
       Try a variation of this.
       <?php
           $args=array(
             'category__in' = array(7,45),
             'showposts' => 5,
             'caller_get_posts'=>1
           );
           $my_query = new WP_Query($args);
           if( $my_query->have_posts() ) {
             echo '5 recent Posts';
             while ($my_query->have_posts()) : $my_query->the_post(); ?>
               <p><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></p>
              <?php
             endwhile;
           } //if ($my_query)
         wp_reset_query();  // Restore global post data stomped by the_post().
       ?>
       ```
   
 *  Thread Starter [nicoliver](https://wordpress.org/support/users/nicoliver/)
 * (@nicoliver)
 * [16 years, 7 months ago](https://wordpress.org/support/topic/stop-posts-loop-and-start-page-content-loop/#post-1251280)
 * You’re a genius! Thank you so much!!
    Been trying to solve this for ages.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Stop posts loop and start page content loop’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [nicoliver](https://wordpress.org/support/users/nicoliver/)
 * Last activity: [16 years, 7 months ago](https://wordpress.org/support/topic/stop-posts-loop-and-start-page-content-loop/#post-1251280)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
