How can I support plugins in a custom theme?

Underscores.me Framework has integrated support for Jetpack’s Infinite Scroll feature – you could just install the Automattic JetPack plugin and ensure that the Infinite Scroll feature is enabled.

Lines 155-156 of the default underscores.me framework add Jetpack support if it’s installed:

/**
 * Load Jetpack compatibility file.
 */
if ( defined( 'JETPACK__VERSION' ) ) {
    require get_template_directory() . '/inc/jetpack.php';
}

In that Jetpack include file (/inc/jetpack.php) on lines 17-23 you get:

function test_jetpack_setup() {
// Add theme support for Infinite Scroll.
add_theme_support( 'infinite-scroll', array(
    'container' => 'main',
    'render'    => 'test_infinite_scroll_render',
    'footer'    => 'page',
) );

I’ve never used an infinite scroll for standard WordPress posts/content but I have written my own for custom post types like a portfolio – I’ve looked at the code and it’s really use-case specific and I don’t know if it’d be much help to you.

Basically I write out an new WP_Query (outside of the loop) to load 12 of the the custom post-type’s posts, then I write a javascript that triggers an AJAX function to load more posts and append them to the parent container when the user scrolls to an existing point in the page and then write a callback that executes a new WP_Query for the AJAX call to use as an action.

Hope this all helps.