InfiniteScroll will not load new galleries

michael.humphreys.n's Avatar


15 May, 2018 07:48 AM

I'm trying to add InfiniteScroll to my blog page where I'm using default WordPress RS Galleries, but when it loads the new content the galleries don't show.

I think I saw somewhere an issue with the order of scripts loaded, but can't find the information again and have tried a few things with no luck.

I will leave the IS plugin on for you to see.

Thanks for the help!

  1. Support Staff 1 Posted by Dmitry Semenov on 15 May, 2018 06:54 PM

    Dmitry Semenov's Avatar


    By default sliders are initialized in footer, your infinite scroll script likely doesn't take that into account.

    You may override RoyalSlider shortcode so initializing script is added right after slider element, here is an example

  2. 2 Posted by michael.humphre... on 16 May, 2018 06:43 AM

    michael.humphreys.n's Avatar


    Thanks for your response.

    I tried pasting that in my functions but nothing happened. Am I missing something?
    I see that it reads the id from my slider, so no need to predefine any variables.

  3. Support Staff 3 Posted by Dmitry Semenov on 16 May, 2018 12:26 PM

    Dmitry Semenov's Avatar

    The above code adds shortcode [fire_royalslider id="YOUR_SLIDER_ID"].

    So if you were using [royalslider id="1"] you can replace it with [fire_royalslider id="1"].

  4. 4 Posted by michael.humphre... on 16 May, 2018 12:44 PM

    michael.humphreys.n's Avatar

    I see.

    But I guess it would be different for the default Wordpress gallery

    How would that be then?

  5. Support Staff 5 Posted by Dmitry Semenov on 16 May, 2018 04:57 PM

    Dmitry Semenov's Avatar

    For default WP gallery - you'll need to initialize slider manually.

    1. Via JavaScript bind event that triggers when your infinite-scroll script adds content.
    2. Execute jQuery('.royalSlider').royalSlider() method to intiailize the slider.


  6. 6 Posted by michael.humphre... on 16 May, 2018 07:25 PM

    michael.humphreys.n's Avatar

    This works great. Thank you.

    However it seems to be loading a different slider...?

  7. Support Staff 7 Posted by Dmitry Semenov on 16 May, 2018 08:00 PM

    Dmitry Semenov's Avatar

    Slider options are defined during initialization:

      // options

    Default initialization code is printed at the end of footer, so you may view page source and copy options from it. As an alternative, check docs of HTML version

  8. 8 Posted by michael.humphre... on 16 May, 2018 08:06 PM

    michael.humphreys.n's Avatar


    Thank you for the help.

  9. michael.humphreys.n closed this discussion on 16 May, 2018 08:06 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac