Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Add Infinite Scroll to Custom WordPress Theme

  • This topic is empty.
Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #41315
    Anonymous
    Inactive

    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.

    http://aarongmoore.com/blog/

    http://wordpress.org/extend/plugins/infinite-scroll/

    #117456
    Anonymous
    Inactive

    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.

    #117459
    TheDoc
    Member

    Infinite scroll on a blog is super easy. I’m not sure what you’re having difficulty with. What happens after you install the plugin?

    #117460
    Anonymous
    Inactive

    Thank you for replying!!!

    Nothing happens. I think I’m stuck because I don’t understand what the options are asking for. (Image here: http://imgur.com/EZYMx&lIfrN)

    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:



    ‘, ‘

    ‘); ?>

    “>

    Posted by at

    max_num_pages > 1 ) : ?>


    #117462
    TheDoc
    Member

    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’.

    You might need to use this function instead: http://codex.wordpress.org/Function_Reference/paginate_links

    It might give you a class that you can hook into for the next page. You’ve already got `#content` in there correctly, but you’ll want to change the Navigation Selector to `.pagination`.

    #117468
    Anonymous
    Inactive

    I don’t understand what this:

    > You might need to use this function instead: http://codex.wordpress.org/Function_Reference/paginate_links

    The _infinite scroll_ seems to ask for a link in the index.php code but I thought that link was created using php in wordpress. Do I need to add a link or a div around some part of the index.php code?

    What do I put in for the “next selector” in that options page? I’m presuming I need to change something in index.php but I still don’t understand what that is.

    #117793
    Anonymous
    Inactive

    I’m still not sure what to put in where _infinite scroll_ asks for a link to the next post that it calls a “next selector” link. Where would I find that in the index.php code?

    #118154
    Anonymous
    Inactive

    Does anyone know what to put in the “next selector” section to get _infinite scroll_ to work? Do I need to change something in the index.php file code?

    #118156
    TheDoc
    Member

    You need to change the type of pagination that you are using so that you can clearly target the page 2 link.

    #118205
    Anonymous
    Inactive

    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.

    #118346
    Anonymous
    Inactive

    I may have finally gotten _Infinity Scroll_ to work. Now I’m trying to figure out how to get the loading image to be in the center rather than being on the left.

    #118360
    TheDoc
    Member

    Yay! Sorry I couldn’t delve into it deeper, only have so much time while working to hop onto the forum.

    #118550
    Anonymous
    Inactive

    @TheDoc no worries, appreciated the help.

Viewing 13 posts - 1 through 13 (of 13 total)
  • The forum ‘CSS’ is closed to new topics and replies.