Hi everyone,
I used the WP jQuery Lightbox for my WP gallery to make the whole design more attractive for mobile devices like Smartphones. Turned out it works very well with the default WP gallery and I was very satisfied. Unfortunately, the default WP gallery is not very attractive on mobile devices. While stumbling across this thread, I thought I found the solution for my gallery problem. RGG is the best gallery I have seen so far and I was very excited about using it on my blog. Sadly, as mentioned by areyouscreening, the WP jQuery Lightbox (jqlb) isn’t compatible with RGG out of the box. So I tried to modify both plugins a little bit to make this dream-team of responsive design come together ??
It is working now on my WP, but I can’t estimate all of the consequences, because I’m not that familiar with WP.
I found out, that only the jqlb is working when both plugins are activated. So some part of jqlb is maybe overriding the changes of RGG. After changing the priority of add_filter( ‘post_gallery’, […] ); in jqlb to 8 (was 10), RGG was working properly while jqlb was still enabled. First success! But now, jqlb was not working, because of double rel=”” attributes in the link tag of the images (the first one from RGG and the second one from jqlb). So I deleted the rel=”” attribute from RGG (because jqlb needs it to work properly) and as far as I can tell, both plugins are working without problems now.
Summary:
Change in wp-jquery-lightbox.php
add_filter('post_gallery', 'jqlb_filter_groups', 10, 2);
to
add_filter('post_gallery', 'jqlb_filter_groups', 8, 2);
Then change in gallerygrid.php
echo "<a rel=\"$rel\" href=\"$link\" title=\"$title_esc\">$img</a>";
to
echo "<a href=\"$link\" title=\"$title_esc\">$img</a>";
Again, I don’t know if my modification causes any problems. As far as I can tell, it works fine.
Finally, I would like to thank both developers for their amazing work! The collaboration of both plugins makes the gallery in WP so much more enjoyable on mobile devices. Thank you for sharing your work and experience with this community.