Warning: Use of undefined constant closed - assumed 'closed' (this will throw an Error in a future version of PHP) in /home/customer/www/codenegar.com/public_html/wp-content/themes/codenegar/functions.php on line 171
ID Status Date Product
#18330016 Closed Instagram Gallery
Nick Shipilin

I need to feed 2 shortcode based galleries on one page. One shortcode pulls specific type of instagram images and another pull the 2nd type. The plugin fails to load whichever one is called 2nd. I believe it may have to do with resources loaded twice or something like that.

Please advise if there is a way to use 2 shortcodes per page?

Nick Shipilin

Worth mentioning is that the images are pulled in but the <li> containers don’t get positioned or sized.

In other words the fully loaded gallery thumbnails have the tag with something like this:

<li class=”hvr-grow medium masonry-brick style=”width: 33.2394%; display: block; position: absolute; top: 0px; left: 0px;>

While the second gallery loads the containers but something that is supposed to resize, position and make them visible – fails.

<li class=”hvr-grow medium> is all it has  no “masonry-brick” class nor style tag…

Nick Shipilin

I guess I found the “solution” or a hack to load 2 galleries.

In the gamma.js (line 234) the Gamma is defined as the first instance of .gamma-container, so I made all execute instead of the first only.

234 //Gamma.container = jQuery( ‘.gamma-container’ ).first();
235     Gamma.container = jQuery( ‘.gamma-container’ );


Is there any particular reason it was limited to the first only?

Farhad Ahmadi


Thanks for contacting.

It’s great that you have found the solution.

The reason for that code is just performance. We have limited a jQuery selector so it doesn’t load all the DOM. By specifying number of elements, the required memory is reduced.

I have noted this and we will remove the limitation in the next update.

Thanks for reporting.


Write a reply

The ticket has been closed. If you feel that your issue has not been solved yet or something new came up in relation to this ticket, you can re-open it by clicking this link.