WordPress.org

Ready to get started?Download WordPress

Forums

Jetpack by WordPress.com
Infinite scroll functions breaking site (2 posts)

  1. Ggnome
    Member
    Posted 2 months ago #

    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/

  2. designsimply
    Member
    Plugin Contributor

    Posted 2 months ago #

    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?

Reply

You must log in to post.

About this Plugin

About this Topic