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!
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.
- Go to Jetpack → Settings → Search for “infinite scroll”.
- Click “Load more posts as the reader scrolls down”.
- 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!