[Plugin: Infinite-Scroll] Infinite Scroll and custom loops
-
Trying to get infinite scroll to work with a custom loop.
My loop up top on the homepage looks like this:
<?php $counter = 1; query_posts( array( 'showposts' => get_option('freshlife_featured_post_num'), 'tag' => get_option('freshlife_featured_post_tags') ) ); if( have_posts() ) : while( have_posts() ) : the_post(); ?> // do stuff <?php $counter++; endwhile; endif; wp_reset_query(); query_posts('offset=4'); ?>That outputs the first 4 posts. Then, the rest of the content (starting with post 5) is outputted using this:
<?php if (have_posts()) : while ( have_posts() ) : the_post() ?> <?php include(TEMPLATEPATH. '/includes/templates/loop.php'); ?> <?php endwhile; ?> <div class="clear"></div> <?php if (function_exists('wp_pagenavi')) wp_pagenavi(); else { ?> <div class="pagination"> <div class="left"><?php previous_posts_link(__('Newer Entries', 'themejunkie')) ?></div> <div class="right"><?php next_posts_link(__('Older Entries', 'themejunkie')) ?></div> <div class="clear"></div> </div> <!-- end .pagination --> <?php } ?> <?php else : ?> <?php endif; ?>The problem is, after I scroll down the blog towards the end of my list of posts and the infinite scroll kicks in, it loads post number 5 again instead of loading post number 15 or whatever it is at the end.
What’s going on here? Any way to get this to work?
The topic ‘[Plugin: Infinite-Scroll] Infinite Scroll and custom loops’ is closed to new replies.