Thanks Tom!
Here’s the config.
function mytheme_infinite_scroll_init() {
add_theme_support( 'infinite-scroll', array(
'container' => 'content',
'footer' => false,
'type' => 'scroll',
'footer_widgets' => false,
'wrapper' => true,
'posts_per_page' => false,
) );
}
add_action( 'init', 'mytheme_infinite_scroll_init' );
function mytheme_infinite_scroll_render() {
get_template_part( 'loop' );
}
function mytheme_infinite_transporter_init() {
add_theme_support( 'infinite-transporter', array(
'type' => 'scroll', // scroll | click
'requested_type' => 'scroll', // store the original type for use when logic overrides it
'footer_widgets' => false, // true | false | sidebar_id | array of sidebar_ids -- last two are checked with is_active_sidebar
'container' => 'content', // container html id
'wrapper' => true, // true | false | html class
'footer' => false, // boolean to enable or disable the infinite footer | string to provide an html id to derive footer width from
'google_analytics'=> true, // boolean if using google analytics, set to true
'post_order' => false, // boolean. false to display newest post after initial post. True to display next reverse chronological post after current post.
'footer_callback' => false, // function to be called to render the IS footer, in place of the default
'posts_per_page' => false, // int | false to set based on IS type
'click_handle' => true, // boolean to enable or disable rendering the click handler div. If type is click and this is false, page must include its own trigger with the HTML ID 'infinite-handle'.
) );
}
add_action( 'init', 'mytheme_infinite_transporter_init' );