Title: Loading same 3 posts
Last modified: September 28, 2016

---

# Loading same 3 posts

 *  Resolved [justinledelson](https://wordpress.org/support/users/justinledelson/)
 * (@justinledelson)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/loading-same-3-posts/)
 * My classes are set up properly and the ajax seems be working, however when I 
   load more, it just loads the same 3 posts.
 *     ```
                               <div class="f-photo-wrapper">
       	                        <ul class="site-main">
       							<?php
       							$paged = ( get_query_var( 'paged' ) ) ? get_query_var( 'paged' ) : 1;
       							$args = array (
       							    'posts_per_page' => 3,
       								'post_type' => 'photos', 
       								'paged' => $paged
       							);
       							$wp_query = new WP_Query($args); // exclude category 9
       							while ($wp_query->have_posts()) : $wp_query->the_post(); ?>
   
       							<li <?php post_class(); ?> id="post-<?php the_ID(); ?>">
       								<a href="<?php the_post_thumbnail_url(); ?>" rel="lightbox" class="fgallery_fancybox"><?php the_post_thumbnail(); ?></a>
       							</li>
   
       							<?php endwhile; ?>
       	                        </ul>
   
       	                        <div class="navigation">
       	                            <ul class='nav-links'>
       	                                <li><a href="#" class="previous">Previous</a></li>
       	                                <li><a href="#" class="next">Next</a></li>
       	                            </ul>
       	                        </div>
       							<?php wp_reset_postdata(); // reset the query ?>
                               </div>
       ```
   

The topic ‘Loading same 3 posts’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/malinky-ajax-pagination_e2c6ba.svg)
 * [Ajax Pagination and Infinite Scroll](https://wordpress.org/plugins/malinky-ajax-pagination/)
 * [Support Threads](https://wordpress.org/support/plugin/malinky-ajax-pagination/)
 * [Active Topics](https://wordpress.org/support/plugin/malinky-ajax-pagination/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/malinky-ajax-pagination/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/malinky-ajax-pagination/reviews/)

## Tags

 * [load](https://wordpress.org/support/topic-tag/load/)

 * 0 replies
 * 1 participant
 * Last reply from: [justinledelson](https://wordpress.org/support/users/justinledelson/)
 * Last activity: [9 years, 8 months ago](https://wordpress.org/support/topic/loading-same-3-posts/)
 * Status: resolved