• Resolved justinledelson

    (@justinledelson)


    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.