We used this tutorial: http://www.problogdesign.com/wordpress/load-next-wordpress-posts-with-ajax/ to learn more about a “load more posts” button and how to implement it.
We got it to work beautifully but there is a slight issue. When we have a custom post format with a gallery (flexslider) on the second page (e.g. the page that gets loaded) and we press the load more posts the flexslider doesn’t get loaded.
We’re sure this is something that can be fixed relatively easy but we’re just looking over it! 
Thanks in advance!
You probably want to switch to something like infinite scroll(you can have a load more post button) but it has a callback for js
Run Flexslider in the callback function of load() :
$('.pbd-alp-placeholder-'+ pageNum).load(nextLink + ' .post',
function() {
// Run Flexslider here
// Update page number and nextLink.
pageNum++;
nextLink = nextLink.replace(/\/page\/[0-9]?/, '/page/'+ pageNum);
// Add a new placeholder, for when user clicks again.
$('#pbd-alp-load-posts')
.before('<div class="pbd-alp-placeholder-'+ pageNum +'" />')
// Update the button message.
if(pageNum <= max) {
$('#pbd-alp-load-posts a').text('Load More Posts');
} else {
$('#pbd-alp-load-posts a').text('No more posts to load.');
}
}
);digitalimpact said
Run Flexslider in the callback function of load() :$('.pbd-alp-placeholder-'+ pageNum).load(nextLink + ' .post', function() { // Run Flexslider here // Update page number and nextLink. pageNum++; nextLink = nextLink.replace(/\/page\/[0-9]?/, '/page/'+ pageNum); // Add a new placeholder, for when user clicks again. $('#pbd-alp-load-posts') .before('<div class="pbd-alp-placeholder-'+ pageNum +'" />') // Update the button message. if(pageNum <= max) { $('#pbd-alp-load-posts a').text('Load More Posts'); } else { $('#pbd-alp-load-posts a').text('No more posts to load.'); } } );
Thank you so much Digitalimpact!! We owe you one 
wpminima said
Thank you so much Digitalimpact!! We owe you one![]()
No problem buddy, glad to have helped 
