I put together the theme currently running on my website using the WordPress tutorial here on CSS-Tricks. I’d like to add infinite scroll and have the plugin installed but I’m not sure how to get it to work with the custom theme. I’m guessing I need to modify or add something to the loop part of the site. Hopefully someone here can help.
Is this not actually possible then? I’ve spent hours searching the internet and all I seem to find is instructions on how to install a plugin or vague code snippets without detail on where to put them.
Specifically where it asks for the page navigation and next link selector. I’m sure something in index.php needs to be changed but I can’t figure out what. I’m currently using the _WP Page Numbers_ plugin for pagination, I want to change that to use the _Infinite Scroll_ plugin. Here is the blog I’m trying to get this to work with: http://www.aarongmoore.com/blog
Here is the code that is in my index.php right now:
< ?php if (have_posts()) : ?>
< ?php while (have_posts()) : the_post(); ?>
< ?php the_date('l, jS F, Y', '
Infinite Scroll needs to know where it is going to pull the next bit of data from. That’s pretty simple as long as you have control over how the pagination gets spit out. In your case, you’re using wp_page_numbers to output the pagination, this might make it difficult to target the ‘next page’.
I thought I’d need to change the type of pagination but I’m not sure what to change it too. I’ve searched online and none of the articles about _infinity scroll_ explain how to set up the required pagination. I’m hoping someone here will be able to tell me what to do.