JetPack Infinite Scroll not working on custom theme

I have a custom theme where I’ve tried to integrate the Infinite Scroll option within JetPack. Per this article, I’ve added the following code to functions.php (in addition to activating the module) –

<?php 
    add_theme_support( 'infinite-scroll', array(         
    'container' => 'content',         
    'footer' => 'page',       
) );
?>

The live site can be found here.

My problem is that the infinite scroll function doesn’t seem to be, well, functioning. Pagination still occurs when 10 posts are reached.

I’m not exactly sure where I’ve gone wrong as I followed the articles steps as they were written. Any ideas?

2 Answers
2

Have you tried adding 'type' => 'click' under 'footer' => 'page', to see if the Jetpack works with click rather than the default scroll?

It is also worth going to Settings -> Reading in the admin panel… does it say “To infinity and beyond….We’ve disabled this option for you since you have footer widgets in Appearance → Widgets, or because your theme does not support infinite scroll.”? You might look at what it says here before trying the above step. If you get this error it might be a conflict between your footer and the scroll.

I think your container might also need to be 'blog' and not 'content', as the div your posts are held in seems to be #blog.

Leave a Comment