The infinite scroll works well when I'm on my localhost. It also works when I install my theme to my website to test. But when I install the theme on my client's WP installation, 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:

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

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());


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

  • 1
    If it's a difference between hosts or servers then it's not likely anyone here will have enough detail to be able to answer well. Have you tried Jetpack support? You might find it helpful to review How to Ask – Andy Macaulay-Brook Oct 7 '16 at 15:50
  • I've just posted on the support forum. Hope to get some help there... – wiredfordesign Oct 7 '16 at 16:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.