Update on Tuesday, February 18, 2014: Gary Jones has a released a plugin that does the same as what's explained below. Get it here.
One of the many modules in Jetpack is Infinite Scroll which loads the next page of posts automatically as visitors reaches the end of posts.
To get Infinite Scroll working in your Genesis theme, the first step is to activate the module in Jetpack.
Scroll type (default):
Since Infinite Scroll depends on a CSS ID for the main element, we will use the genesis_attr_content filter to add a ID to "main" (.content) element only on Post Pages and archives.
We shall then add theme support for infinite scroll while setting
a) [optional] type equal to scroll (default) or click. scroll will cause posts to be loaded automatically when the visitor approaches the bottom of the current list of posts, while click shows a Load more posts button, letting the user control when more posts are loaded.
b) container equal to our custom ID
c) render equal to genesis_do_loop
Finally as we do not want the archive pagination (Next Page» links or numbers) we will remove it using a remove_action.
Add the following in child theme's functions.php:
To view the full content, please sign up for the membership.
Already a member? Log in below or here.