How do I get Jetpacks’ Infinite Scroll to load more than one post?

Here is the code in my functions file to add infinite scroll. Everything is fine except that when I click for more posts I only get one, even though my code says to grab 10. Any clue why this is happening?

function template_name_infinite_scroll_init() {
    get_template_part( 'content-post-standard' );
    //this file contains the post format that I want to load.
}

add_theme_support( 'infinite-scroll', array(
    'type'           => 'click',
    'footer_widgets' => false,
    'container'      => 'infinite',
    'wrapper'        => false,
    'render'         => 'template_name_infinite_scroll_init',
    'posts_per_page' => 10,
    'footer' => 'footer'
));

Related posts

Leave a Reply