Jetpack infinite scroll not working on twentysixteen custom theme
I duplicated twentysixteen theme and only changed the name of the folder and the name of the theme in style.css. I then added in functions.php :
function twenty_sixteen_infinite_scroll_init() {
add_theme_support( 'infinite-scroll', array(
'container' = 'main',
'type' = 'click',
'posts_per_page' = '2',
) );
}
add_action( 'after_setup_theme', 'twenty_sixteen_infinite_scroll_init' );
The older posts button appears but after I click it no more posts are loading. What am I missing?
On the original twentysixteen the infinite scroll works well.
Topic theme-twenty-sixteen infinite-scroll plugin-jetpack Wordpress
Category Web