Title: Infinite Scroll, not loading infinity.js
Last modified: August 22, 2016

---

# Infinite Scroll, not loading infinity.js

 *  Resolved [aplusdesign](https://wordpress.org/support/users/aplusdesign/)
 * (@aplusdesign)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/infinite-scroll-not-loading-infinityjs/)
 * I’ve been trying to use infinite scroll on my blog, but nothing I do seems to
   make to it work.
 * It is enabled, and under reading settings, I have show 4 posts, and scroll infinitely
   selected.
 * My body class is getting ‘infinite-scroll neverending’ and spin.js, and infinity.
   css are attached in the head. But I can’t see any js relating to infinity scroll
   specifically. I assume this is why I get no console errors and nothing seems 
   to happen when scrolling to the end of my posts (there are more than 4 in the
   blog, and more than 7).
 * So my wp theme it would appear is adding Infinite scroll correctly to a point,
   but not appending the necessary js files (infinity.js)?
 * It is a 100% custom built theme, functions.php only consists of built or borrowed
   custom methods. Currently the blog is in dev on my local, there is no live version
   up yet.
 * Here is how I include jetpack
 *     ```
       function wtdip_infinite_scroll_init() {
           add_theme_support( 'infinite-scroll', array(
               'container' => 'content',
       	'footer'    => 'footer'
           ) );
       }
       add_action( 'after_setup_theme', 'wtdip_infinite_scroll_init' );
       ```
   
 * When this is present my theme ignores the reading setting of 4 and spits out 
   7 posts, just an fyi…
 * Can anyone help?
 * [https://wordpress.org/plugins/jetpack/](https://wordpress.org/plugins/jetpack/)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Thread Starter [aplusdesign](https://wordpress.org/support/users/aplusdesign/)
 * (@aplusdesign)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/infinite-scroll-not-loading-infinityjs/#post-5302022)
 * If I change infinity.php line 333 to
 * `wp_enqueue_script( 'the-neverending-homepage', plugins_url( 'infinity.js', __FILE__),
   array( 'jquery' ), 20140523 );`
 * The file gets included.
 * This does not solve the problem, because when it initialises the plugin
 *     ```
       if ( 'object' != typeof infiniteScroll )
       		return;
       ```
   
 * infiniteScroll is undefined!
 * Seriously at a loss, need guidance.
 *  Thread Starter [aplusdesign](https://wordpress.org/support/users/aplusdesign/)
 * (@aplusdesign)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/infinite-scroll-not-loading-infinityjs/#post-5302025)
 * Figured it out. Solution.
 * Don’t remove
 * `<?php wp_footer(); ?>`
 * From your footer.php in your template 🙂

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Infinite Scroll, not loading infinity.js’ is closed to new replies.

 * ![](https://ps.w.org/jetpack/assets/icon.svg?rev=2819237)
 * [Jetpack - WP Security, Backup, Speed, & Growth](https://wordpress.org/plugins/jetpack/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/jetpack/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/jetpack/)
 * [Active Topics](https://wordpress.org/support/plugin/jetpack/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/jetpack/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/jetpack/reviews/)

## Tags

 * [js](https://wordpress.org/support/topic-tag/js/)
 * [loading](https://wordpress.org/support/topic-tag/loading/)
 * [scroll](https://wordpress.org/support/topic-tag/scroll/)

 * 2 replies
 * 1 participant
 * Last reply from: [aplusdesign](https://wordpress.org/support/users/aplusdesign/)
 * Last activity: [11 years, 9 months ago](https://wordpress.org/support/topic/infinite-scroll-not-loading-infinityjs/#post-5302025)
 * Status: resolved