Support » Plugin: Infinite-Scroll » Work with Nextgen Gallery?

Viewing 15 replies - 1 through 15 (of 42 total)
  • I have exactly the same question and / or problem.
    the web is full with this question but no answers so far.

    At least a comment by the developer would be nice.

    Hey there! I’ve figured out the problem – and solved it.
    When you look into the plugin directory, you need to edit something in the following file:

    on the very bottom there is a line with the following content:
    “function shouldLoadJavascript() {“

    after that there is an if-clause you can comment it out or delete it.
    This clause forces the script to stop when wordpress is on a single page (single post, normal pages and so on) and only activates the script (return true) when on a multipager (home, blog, archive, etc)

    after that it runs like we want it.

    There is only one minor thing (navigation below next gen gallery behaves strange) but I will look into it too.

    Hope that helps mate!

    I also made a fix to the lightbox “prettyPhoto”, so it still works after the dynamic reload and a fix to a bunch of other NGG bugs too. Just leave me a message if you are interested in this too, I get updates for this post by email.

    The reason why I am not posting it here directly is because I’ve never got a “thank you” on one of these boards when I’ve posted helpful stuff. Maybe this is the only possibility to get some 😉

    BTW: To make infinite scroll work you need my fix I’ve posted here PLUS you need to configure infinite-scroll with the correct parameters which are:

    content selector: .ngg-galleryoverview
    navigation selector: .ngg-navigation
    next selector: .ngg-navigation
    item selector: .ngg-gallery-thumbnail-box

    Hi thisismyalterego !

    And THANKS a lot for you post ! This is exactly what I was looking for. I’m using nextgen for a long time, and I tried to use infinite scroll with it, but with no luck… I’m trying to set things up like you said – still don’t work at the moment.

    Anyway, thanks, because now I know it can work !

    Actually, maybe you can help me : I’ve activated the plugin, changed everything for selectors, modified the .php file in the plugin directory, but nothing is showing up. I still have my classic page of ngg gallery, with pagination on the bottom.
    If I check the loaded files, can’t find anything about infinite scroll…

    Am I missing something ?

    Hi Kewdo,
    can you offer me a screenshot of the part of your code from the infinite-scroll.php file?

    Here is what my function there looks like:

    Do you have the latest version of NGG running?

    If there is no hint that anything from infinite-scroll is loaded at all there must be something wrong with that php file, not only the selectors. We will fix that – I’m sure. Just compare yours with mine or upload a screen here 🙂

    Oh and do you have a link to your page? Maybe I can have a look too

    Thanks again for awnsering !

    Well, I originally changed the ‘false’ to true in this part of the code, but then I just paste the code you just gave me – same results.

    Nothing seems to be loaded at all on single pages, and I can’t test on a ‘post’ page as far as I have none in my theme.

    Here’s a link to a single page, with a gallery and several pages :

    Hello again,
    I saw that there are some bugs on our page. We should get rid of them first.
    When looking in the console it says that the following files (which are included) can not be found:


    also some graphics are missing, but this shouldn’t be a problem. But with missing js files… this might not so good.

    Oh, and do you have the latest version of ngg and infinite-scroll (from ?

    I get rid of the two js files missing – indeed, i don’t need them.

    For the graphic missing, white.gif, I don’t know where the hell it’s called. Seems to be in jquery, i’ll look into it.

    Anyway: yes, I’ve updated nggallery, and downloaded the wordpress plugin from

    alright. Maybe some other plugins are messing around?
    Can you try using another theme for testing? Because you are using something like jquery to load the content currently…  this could make it more difficult.

    I don’t see any reason that infinitescroll isn’t loaded at all, but maybe it’s your theme.

    The only thing I also did – I don’t know if it matters is, that I am using another permalinkstructure – when having get parameters submitted via url by using ?page= I’ve experienced some problems with infinite loop in the past, so I’ve changed that and I’ve also changed the permalink structure in nextgen-gallery plugin. There is an option for that . But this we can check out later.

    Indeed with the default theme, it’s working, loading more pages.
    So, there is a conflict with something in my theme : how to deal with it ?

    Another idea would be to deactivate every other plugin first.

    I saw in your code you are using slimbox. Problem is that slimbox is including another jquery-latest library so there are 2 of them included in your code…

    Is your theme written by yourself or is it a theme from the web (that got modified)

    Well, I have not much plugins to deactivate… Because I’m using slimbox directly in the code.

    I’m going to try removing lines and testing one by one I guess ..!

    And the theme is fully written by myself (sometimes using parts of code found somewhere else – but always trying to understand it)

Viewing 15 replies - 1 through 15 (of 42 total)
  • The topic ‘Work with Nextgen Gallery?’ is closed to new replies.