Jetpack Infinite Scroll Uncaught SyntaxError: Unexpected token “<“

When implementing Jet Pack for wordpress infinite scroll, my dev/staging server throws this error and wont load the next posts. However, locally it works fine, posts load normally and no console error. I’ve looked for open tags, and attempted to reorganize a few function calls however, the console always throws an unexpected token error for the first character in the header.php. I swear at one point it was working on the live dev/staging server but I could be mistaken.

Uncaught SyntaxError: Unexpected token <

Read More

enter image description here

This is my Init for Infinite Scroll

// Add Infinite Scroll

function elevator_infinite_scroll_init() {
    add_theme_support( 'infinite-scroll', array(
    'type' => 'click',
    'container' => 'content',
    'render' => 'elevator_infinite_scroll_render',
    'footer' => false,
    'wrapper' => false,
    'posts_per_page' => '9',
    ));
}
add_action( 'init', 'elevator_infinite_scroll_init' );

function elevator_infinite_scroll_render() {
    get_template_part( 'more-content');
}

testing for any plugin conflicts now

Related posts