Title: Load next posts into wordpress Page loop
Last modified: August 21, 2016

---

# Load next posts into wordpress Page loop

 *  [hugerobots](https://wordpress.org/support/users/hugerobots/)
 * (@hugerobots)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/load-next-posts-into-wordpress-page-loop/)
 * I’m trying to place 2 collumns with 2 different loops on one Page, then use the
   Infinite Scroll plugin to load the next set of posts into it’s respective container
   when a user clicks on a `Load More Posts` button.
 * When loading the following loop, the pagination for itself doesn’t appear at 
   all. Also the link selectors for the Infinite Scroll plugin don’t seem to apply
   either.
 * Is there a problem with loading the loop within a Page, or is there an issue 
   with the use of `WP-Query`?
 *     ```
       <div class="thirdLeft">
   
       			<?php
       				$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
       				$first_query = new WP_Query('showposts=1');
       				while($first_query->have_posts()) : $first_query->the_post();
       			?>
   
       			<div class="initialPostLoad">
       					<?php get_template_part( 'content', 'single' ); ?>
       			</div> <!-- end initialPostLoad -->
   
       			<?php endwhile; ?>
   
       			<div class="loadNextPosts">
       				<?php
       					// usage with max_num_pages
       					next_posts_link( 'Older Entries', $the_query->max_num_pages );
       					previous_posts_link( 'Newer Entries' );
       				?>
       				<a class="loadInfinitePosts" href="#">Load More Posts</a>
       			</div>
       	</div>
       ```
   
 * And the infinite scroll script placed in the header:
 *     ```
       $('.thirdLeft #articlePost').infinitescroll({
   
       	    navSelector  : ".loadNextPosts",
       	                   // selector for the paged navigation (it will be hidden)
       	    nextSelector : ".loadInfinitePosts a:first",
       	                   // selector for the NEXT link (to page 2)
       	    itemSelector : ".thirdLeft .initialPostLoad"
       	                   // selector for all items you'll retrieve
       	  });
       ```
   
 * [http://wordpress.org/plugins/infinite-scroll/](http://wordpress.org/plugins/infinite-scroll/)

The topic ‘Load next posts into wordpress Page loop’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/infinite-scroll.svg)
 * [Infinite-Scroll](https://wordpress.org/plugins/infinite-scroll/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/infinite-scroll/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/infinite-scroll/)
 * [Active Topics](https://wordpress.org/support/plugin/infinite-scroll/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/infinite-scroll/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/infinite-scroll/reviews/)

## Tags

 * [jquery](https://wordpress.org/support/topic-tag/jquery/)
 * [loop](https://wordpress.org/support/topic-tag/loop/)
 * [pagination](https://wordpress.org/support/topic-tag/pagination/)

 * 0 replies
 * 1 participant
 * Last reply from: [hugerobots](https://wordpress.org/support/users/hugerobots/)
 * Last activity: [12 years, 10 months ago](https://wordpress.org/support/topic/load-next-posts-into-wordpress-page-loop/)
 * Status: not resolved