WordPress.org

Ready to get started?Download WordPress

Forums

Infinite-Scroll
[resolved] [Plugin: Infinite Scroll] CSS Selectors Trouble, can't figure this out (5 posts)

  1. jeriksson
    Member
    Posted 2 years ago #

    Hi,

    I'm using the Inove Theme on a site where i want infinte scroller, but i can't figure it out. I've tried it all using firebug to find the right selectors (obviously i'm doing it wrong).

    This is the theme: http://wordpress.org/extend/themes/inove

    From what i can tell this should be the correct code:

    Content CSS Selector: #content
    Post CSS Selector: #content .main .post
    Navigation Links CSS Selector: div.wp-pagenavi
    Previous posts CSS Selector: div.wp-pagenavi a:nextpostslink
    (I'm using the Wp-pagenavi plugin for next/previous links etc).

    But this won't work. I'm no expert, anyone able to help me out here? Would love to get this thing working!

    Here is the code for my theme in firebug :

    Thank you

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

  2. beaver6813
    Member
    Plugin Author

    Posted 2 years ago #

    Hi There,

    I found this worked well on my test site for this theme:

    Content CSS Selector: #main
    Post CSS Selector: #main div.post
    Navigation Links CSS Selector: #pagenavi
    Previous posts CSS Selector: #pagenavi span.older a:first

    That should work (as it works on my test install!) In a couple of weeks I'm looking at implementing a really cool auto-detect feature. Where the script will have a database of known themes->selectors and infinite-scroll can try and auto-detect the correct ones.

    Enjoy scrolling infinitely!

  3. blitz999
    Member
    Posted 2 years ago #

    Hi Beaver,

    I take it you develop this plugin?

    I have the same issue of not being able to work out the selectors. However, I think the issue might be a little different. I'm building a TwentyELeven child theme. This is with HTML5, so I think the selectors are:

    #content

    #content article.post

    #nav-below

    .nav-previous

    Is it the new article element breaking this, or have I missed a trick?

    Cheers.

  4. beaver6813
    Member
    Plugin Author

    Posted 2 years ago #

    Sorry for taking so long to get back to you!
    That last selector should be:
    .nav-previous a:first
    (or even:
    #nav-below .nav-previous a:first if you want to be really picky!)

    Reason being, the script needs to select the previous page link and there may be more than one link in your navigation boxes :)

  5. blitz999
    Member
    Posted 2 years ago #

    Thanks for that, I found it eventually on the other post and got it sussed! Still getting the new site set up, but if it turns out as awesome as it is starting to look, I'll send you a link.

    Thanks for all your amazing work on this. It is stuff like this that makes the internet better.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic