• Hi,

    I’m trying to get the infinite scroll option working on my site, I have it all working on localhost but when I upload it all it breaks my site, everything is just a white/blank screen.

    I figured the problem is coming from the code I put in the functions.php which is this:

    function news_infinite_scroll_setup() {
    	add_theme_support( 'infinite-scroll', array(
    	'type'           => 'click',
    	'container'      => 'wrapper',
    	) );
    }
    add_action( 'after_setup_theme', 'news_infinite_scroll_setup' );

    I think the problem is coming from this bit:

    'type'           => 'click',
    'container'      => 'wrapper',

    and

    add_action( 'after_setup_theme', 'news_infinite_scroll_setup' );

    They seem to be the bits that are causing me bother.

    Any help would be great,

    Thanks

    https://wordpress.org/plugins/jetpack/

Viewing 1 replies (of 1 total)
  • Plugin Contributor designsimply

    (@designsimply)

    I have it all working on localhost but when I upload it all it breaks my site

    That sounds strange. Is the theme you are testing on localhost and the one on your site exactly the same other than the edited code you included in your help request?

    If you edit the functions.php file directly on your site to remove the lines of code you quoted after you see the white/black screen, does the problem go away?

    Would you be able to include a link to your site in case it helps to take a look at it directly?

Viewing 1 replies (of 1 total)
  • The topic ‘Infinite scroll functions breaking site’ is closed to new replies.