How to Add jQuery Infinite Scroll to My Custom Archive Page

I assume this is a page or page template of some sort? I had a similar need so submitted a patch to the Infinite scroll plugin for the inclusion of a new filter infinite_scroll_load_javascript. By default the plugin doesn’t load on any singular posts/pages, but with this filter you can toggle it to load wherever you’d like.

function wpa_73217($load){
  if(is_page_template('my_special_template.php'))
       $load = true;
  return $load;
} 
add_filter('infinite_scroll_load_javascript', 'wp_73217');

Of course, you’r initialization scripts still have to work… aka you’re selectors have to be correct.

Leave a Comment