how to get jetpack’s infinite scroll to work with woocommerce?

The problem lies in the ‘container’ => ‘content’. The container parameter is the core of adding infinite scroll to your theme: it specifies the ID of the HTML element to which infinite scroll should add additional posts to. You need to add ID ( for example: product-wrapper ) to products wrapping element which is going … Read more

Help add ajax load more button

Your div wrapper is within your while loop, and split by your if clause. This cannot work properly, since your loop will generate up to 14 divs with the id ajax. Put the opening div tag after if ( $the_query->have_posts() ) { and the closing after wp_reset_postdata(); and you should be fine. Edit Are you … Read more

How to create infinte scroll in wordpress for blog and custom post type

You probably need to define a new loop function for the Custom Post Type to pass to the render parameter. As in the example from https://jetpack.com/support/infinite-scroll/ /** * Add theme support for infinity scroll */ function twenty_ten_infinite_scroll_init() { add_theme_support( ‘infinite-scroll’, array( ‘container’ => ‘content’, ‘render’ => ‘twenty_ten_infinite_scroll_render’, ‘footer’ => ‘wrapper’, ) ); } add_action( ‘after_setup_theme’, … Read more

Isotope with Infinite Scroll

Usually isotope allows appending new items and then just re-layout the masonry again: Somewhere in your JS file you should put the elements you want to append into a variable, e.g. new_elements jQuery(‘.grid’).append(new_elements) .isotope(‘appended’, new_elements) .imagesLoaded( function() { jQuery(‘.grid’).istotope(‘layout’); }); Source: http://isotope.metafizzy.co/methods.html The solution Thanks to @vajrasar for the final touches. When you echo the … Read more

Adding LazyLoad and InfiniteScroll to WordPress Theme

You need to add the callback function in the argument list as part of the function call, rather than as part of the argument object: jQuery( infinite_scroll.contentSelector ).infinitescroll( infinite_scroll, function(){ addLazyLoad() } ); You can remove the function(){ addLazyLoad()} that’s part of the infinite_scroll object (after “contentSelector”:”#content #main”); it’s not going to do anything.