Dev site with new infinite scroll
add_theme_support( 'infinite-scroll', array(
'type' => 'scroll',
'footer_widgets' => false,
'container' => 'content',
'wrapper' => true,
'render' => false,
'posts_per_page' => false
) );
Live site
<?php if ( is_home() || is_category() ) { ?>
$container.infinitescroll({
navSelector : '#nav-below',
nextSelector : '#nav-below .nav-previous a',
itemSelector : '.entries',
bufferPx: 10000,
loading: {
img: "<?php echo get_template_directory_uri(); ?>/images/ajax-loader.gif",
msgText: "<?php _e( 'Loading the next set of posts...', 'custom' ); ?>",
finishedMsg: "<?php _e( 'All content loaded.', 'custom' ); ?>"
},
debug: false,
animate: false
},
function( newElements ) {
var $newElems = $( newElements ).css({ opacity: 0 });
$newElems.imagesLoaded(function(){
$newElems.animate({ opacity: 1 });
$container.masonry( 'appended', $newElems, true );
});
}
);
<?php } ?>