We are going to
- create a `content-archive.php` template part having the code to 1) add `content-archive` body class 2) wrap the posts in a custom container 3) add Load more posts button below the posts 4) ensure that the button does not appear when not needed 4) load Infinite Scroll js and initialize it on the posts container
- call the template part from `home.php` and `archive.php`
While the tutorial has been written for Genesis Sample, it should work with a few adjustments in any Genesis theme
Upload infinite-scroll.pkgd.min.js to child theme's
Create a file named say, infinite-scroll-init.js in the same location having the following:
To view the full content, please sign up for the membership.
Already a member? Log in below or here.