WordPress.org

Ready to get started?Download WordPress

Forums

Infinite-Scroll
[resolved] Jetpack Infinite Scroll doesn't work (3 posts)

  1. Cristian Nistor
    Member
    Posted 1 year ago #

    Hy guys.

    I am trying to use Infinite Scroll on my site but with no avail.

    What I've added to functions.php:

    //Infinite scroll support
    add_theme_support( 'infinite-scroll', array(
            'type'     => 'scroll',
    		'container'  => 'list-posts',
    		'footer'     => 'footer',
    		'wrapper'   => false,
    		'render'      => 'wl_infinite_scroll_render',
    		'posts_per_page'    => 4,
    ) );
    
    function wl_infinite_scroll_render() {
            get_template_part( 'loop' );
    };

    What is not very clear for me: the front page displays an unordered list of posts, so the container attribute is the ID of the ul element. Is this correct?

    Does matter the type of container? I mean, the plugin knows that it deals with an ul element and it has to add some li children?

    Thank you,
    Cristian Nistor

    http://wordpress.org/extend/plugins/infinite-scroll/

  2. designsimply
    Member
    Posted 1 year ago #

    Hello!

    I found that Jeremy has been helping you via WordPress.com support and I wanted to post the advice he sent you here as well. :)

    Instead of creating a new function to call your loop template, I would recommend editing your theme to handle Post Formats through different template parts, like so:
    * content-{post format}.php

    You can find a detailed tutorial to help you tweak your theme here:
    http://ottopress.com/2012/jetpack-and-the-infinite-scroll/

    Once you have made the changes to your theme template hierarchy, you should be able to set the render parameter to false.

    You can read more about it here:
    http://jetpack.me/support/infinite-scroll/

    You had also asked about infinite scroll category archives not working properly for you. That is a bug that has been fixed. See this thread for details:
    http://wordpress.org/support/topic/infinite-scroll-category-archives-not-working-properly?replies=8#post-3385580

  3. Cristian Nistor
    Member
    Posted 1 year ago #

    Thank you Karen :).

    Even not everything is clear for me about how IS (and WP) is working now I can use it without any problems.

    Chhers,
    Cristian Nistor

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic