Archived topic
Blog automatic load more posts on scroll down
5 replies · Started by Alexandros on April 26, 2015
Is it possible to automatically load more posts (within the blog) whenever a user scrolls down, instead of pressing the +Read more button ?
thanks
ok i tried a couple of plug ins as i realized that this is a plugin
but ...
When the 2nd page loads the the content takes max width and the format is broken,
any ideas ? any fixes so far ? any plugin that could do the work
thanks again
Infinite Scroll Options
worked for me.
choose
content selector .masonry-container
scroll down
Behaviour -> masonry
save
that does the trick.
before closing the threat to resolved
those are the default values... since everything seems to be ok do you believe there is any reason for changing those to a different value please ?
Navigation Selector Div containing your theme's navigation -->#nav-below
Next Selector Link to next page of content -->#nav-below a:first
Item Selector Div containing an individual post -->.post
thank you
Wow - not sure how I missed this, super sorry!
Glad to see you figured it all out!
Navigation Selector Div containing your theme’s navigation –>#nav-below - correct
Next Selector Link to next page of content –>#nav-below a:first - correct
Item Selector Div containing an individual post –>.post - change this to .masonry-post
That should it :)
As Alexandros said, the Infinite-Scroll plugin seems to work although it hasn't been updated for more than two years. To fix the masonry layout you need to add this code in the Callback box on the Infinite Scroll Options settings screen:
(function($) {
var $container = $('.masonry-container'); // this is the content selector
$container.imagesLoaded( function() {
$container.masonry({
itemSelector: '.masonry-post' // this is the item selector
});
});
})(jQuery);
(Thanks to Jase on this plugin support thread)
Thanks for posting that, Tara! Will definitely come in handy :)