• The infinite scroll works well when I’m on my localhost. It also works when I install my theme to my website to test (hosted on SiteGround). But when I install the theme on my client’s WP installation (hosted on Dreamhost), it doesn’t work any more. I can’t figure out why that would be the case.

    if ( ! function_exists( 'swill_setup' ) ):
        function swill_setup() {
    
        /**
         * Enable support for the Infinite Scroll
        */
    
        add_theme_support( 'infinite-scroll', array(
          'container' => 'content',
          'footer'    => false,
          'wrapper'   => true
        ) );
      }
    endif; // theme setup
    
    add_action( 'after_setup_theme', 'swill_setup' );

    I have a content.php file too:

    <article>
      // the loop (too long to include here, but you get the picture)
    </article>

    Which I call like this:

     if ( $the_query->have_posts() ) while ( $the_query->have_posts() ) : $the_query->the_post();
    
      get_template_part('content', get_post_format());
    
    endwhile;

    Why would it be so selective on where it works? I’m puzzled because it seems to work on other servers.

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Jeremy Herve

    (@jeherve)

    Jetpack Mechanic πŸš€

    That seems weird indeed. Just to be sure, could you go to Jetpack > Settings, and make sure the Infinite Scroll module is active on the live site?

    Could you also let me know if the Infinite Scroll option is checked under Settings > Reading?

    Thanks!

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    πŸ³οΈβ€πŸŒˆ Advisor and Activist

    Are you on DreamPress which uses Varnish?

    Varnish and Infinite Scroll aren’t very good friends due to how it caches.

    Thread Starter wiredfordesign

    (@wiredfordesign)

    Yes, I’ve enabled them. Somehow its started working without any effort from me (magic?). But for some reason, as I scroll down the site it jumps to the top of the new ‘page’ (e.g. /page/2). It’s jumping up to the first of the newly loaded posts while I’m still scrolling, and in a very sudden and jerky manner.

    Thread Starter wiredfordesign

    (@wiredfordesign)

    No, it’s just the shared hosting plan. Does it have issues with caching as well?

    Plugin Author Jeremy Herve

    (@jeherve)

    Jetpack Mechanic πŸš€

    Could you post your site URL here, so I can have a look?

    If you want it to remain private, you can also contact us via this contact form:
    http://jetpack.com/contact-support/

    Thread Starter wiredfordesign

    (@wiredfordesign)

    Sure @jeherve. Thanks for the speedy reply. It’s http://www.zumi.co.ke/

    Also check out the other pages, like Beauty. When you get to the bottom, it acts really weird.

    Thread Starter wiredfordesign

    (@wiredfordesign)

    @jeherve Am I meant to implement pagination before the infinite scroll? I don’t have any pagination save for the infinite scroll at the moment.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    πŸ³οΈβ€πŸŒˆ Advisor and Activist

    Shared doesn’t use Varnish at all, so no, it won’t have the same problem.

    (The Varnish problem is if you scroll down on infinite scroll enough times, you’ll fill up memory and the page glitches and reboots…)

    Plugin Author Jeremy Herve

    (@jeherve)

    Jetpack Mechanic πŸš€

    I checked your site in Chrome, and it appears to be working properly:
    http://i.wpne.ws/hkfi

    If you still experience issues, could you let me know in which browser you tried, so I can try to reproduce?

    Thanks!

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

The topic ‘Infinite Scroll Not Working’ is closed to new replies.