• Hey there, great theme! I’m actually loving it and i love the way you biult it up! I only have a problem. Since i’m posting a lot, i was wondering how to have an infinity scroll page. Inside your instruction I read to install jetpack plugin, and that’s what i did, and switched on the infinity scroll option. The problem is that I still have the “older” button to press! How can i get rid of it? I’ve looked inside the html but with no clue. Can you please help me?
    Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter mitch92666

    (@mitch92666)

    Hey there, i’m still trying to figured out how to get rid of “older post” button and get a real infinite scroll.

    I’m been changin the php pagination with this:

    __( ‘Newer’, ‘hamilton’ ), ‘next_text’ => __( ‘Older’, ‘hamilton’ ), ) ); } else { if ( class_exists( ‘Jetpack’ ) && Jetpack::is_module_active( ‘infinite-scroll’ ) ) { the_posts_navigation( array( ‘prev_text’ => __( ‘Newer’, ‘hamilton’ ), ‘next_text’ => __( ‘Older’, ‘hamilton’ ), ) ); } else { while ( have_posts() ) : the_post(); get_template_part( ‘content’, get_post_format() ); endwhile; } } ?>

    And the funcion.php section with this:

    function hamilton_infinite_scroll_init() {
    add_theme_support( ‘infinite-scroll’, array(
    ‘type’ => ‘scroll’,
    ‘container’ => ‘content’,
    ‘render’ => false,
    ‘posts_per_page’ => false,
    ) );
    }
    add_action( ‘after_setup_theme’, ‘hamilton_infite_scroll_init?’);

    But no clue…. any help would be really appreciated. Thanks!

    Theme Author Anders Norén

    (@anlino)

    Hi @mitch92666,

    The Jetpack infinite scroll module works out of the box with Hamilton for me.

    By default, Jetpack will show a “Older posts” button that you click to load more posts. If you want to load more posts automatically when the visitor has scrolled to the pagination, you can set that in the Jetpack settings.

    1. Go to Jetpack → Settings → Search for “infinite scroll”.
    2. Click “Load more posts as the reader scrolls down”.
    3. Click the “Save settings” button.

    — Anders

    Hi @anlino,

    I had used the Jetpack infinite scroll and it worked for a couple weeks. Today I logged in to try to update some posts and noticed that the “Older Posts” button is showing up again even though I checked Jetpack and the “infinite scroll” is turned on. Would you happen to know how to troubleshoot?

    Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Infinity scroll with jetpack doesn’t work?’ is closed to new replies.