Hi there,
1. First, set the infinite scroll button to true, then add this PHP:
add_filter( 'option_generate_blog_settings', function( $settings ) {
if ( wp_is_mobile() ) {
$settings['infinite_scroll_button'] = false;
}
return $settings;
} );
2. You could use some javascript like this:
jQuery( document ).ready( function($) {
var $container = $( '#main article' ).first().parent();
$container.on( 'append.infiniteScroll', function( event, response, path, items ) {
// Done loading new posts.
} );
} );
Let me know if you need more info ๐