Jetpack Infinite Scroll doesn't work :-(
-
Hi guys
I have a static front page that shows the first 20 posts, I am trying to enable the Jetpack Infinite Scroll plugin. I’ve activated it from Jetpack and also enabled it in my theme as follows:
function homepage_infinite_scroll() { get_template_part( 'content', 'home'); }; /** * Add theme support for Infinite Scroll. * See: http://jetpack.me/support/infinite-scroll/ */ function remarkably_jetpack_setup() { add_theme_support( 'infinite-scroll', array( 'container' => 'main', 'type' => 'click', 'wrapper' => false, 'render' => 'homepage_infinite_scroll' ) ); } add_action( 'after_setup_theme', 'remarkably_jetpack_setup' );On my front-page.php (static), I have the following code:
<main id="main" class="site-main" role="main"> <?php if (is_front_page()) { ?> <?php //$custom_loop = new WP_Query('showposts=10&orderby=date'); $custom_loop = new WP_Query('showposts=20&orderby=date'); if ( $custom_loop->have_posts() ) : while ( $custom_loop->have_posts() ) : $custom_loop->the_post(); get_template_part( 'content', 'home'); endwhile; wp_reset_query(); endif; ?> <?php } ?> </main>I don’t see the infinite scroll plugin activating, no classes are added to the body at all.
If I go to Reading in WordPress dashboard, I am unable to activate Infinite Scroll because “We’ve disabled this option for you since you have footer widgets in Appearance → Widgets, or because your theme does not support infinite scroll.”
In appearance widgets, there are no footer widgets at all, only 2 sidebar widgets.
Do you have any idea what might be missing?
Many thanks! 🙂
The topic ‘Jetpack Infinite Scroll doesn't work :-(’ is closed to new replies.