Tagged: modal lightbox
-
AuthorPosts
-
February 26, 2021 at 7:11 pm #1283944
hello!
is there a way to display all images of a single page (from the simple slider and images in the text) in the same lightbox, so that you can click through all images in the lightbox and also the counter at the bottom counts all images? i always have slider and images in the text separated :-( unfortunately i can’t find anything about this or i’m searching under the wrong terms :-/
thanks!
March 6, 2021 at 9:03 pm #1286102Hey hersbers,
Sorry for the very late reply, I tried using a “Easy Slider” element with 4 images and a Gallery element and 4 different images there, and as you pointed out, neither show all images. I don’t see an easy way to have these work together like this, but I can imagine having the slider have no click event but opening the gallery lightbox with a jQuery click event, which you would have to add all of the images to a single gallery element.
So the result would be for the visitor, clicking on the slider would open the gallery. If this sounds like something that might work for you please let us know.
If not please try creating a test page for us to see, and perhaps we can come up with a different solution.Best regards,
MikeMarch 7, 2021 at 10:12 pm #1286238can you try to give to all images on a parent element one combined class.
F.e. group1
i tested it on a simple slider and textblocks in one color-section with custom class : group1
( you can give the custom-class to the alb-elements too – as long as the grouping class is on a parent element of the image with lightbox-added )
then put this to child-theme functions.php:function popup_in_one_group() { ?> <script type="text/javascript"> (function($){ $(window).on('load', function(){ $('.group1').magnificPopup({ delegate: 'a.lightbox-added', type:'image', gallery:{enabled:true}, }); }); })(jQuery); </script> <?php } add_action('wp_footer', 'popup_in_one_group');
On some alb elements f.e. gallery you have no choice to define the lightbox effect selectively on each image. you only have the decision if or if not.
March 7, 2021 at 10:40 pm #1286249sorry – just brainstorming to exclude files of a gallery from that group
- This reply was modified 3 years, 8 months ago by Guenni007.
March 8, 2021 at 9:40 am #1286355Danke, Guenni007! Funktioniert perfekt!
Thank you, Guenni007! Works perfectly!
March 8, 2021 at 1:32 pm #1286437Hi,
Thank you for your input @Guenni007, I was not able to get your script to work on my localhost, grouping the images doesn’t seem to open multiple element images in the same lightbox. Perhaps I misunderstood how it works.
As I understand @hersbers wants the gallery images inside the slider lightbox.Best regards,
MikeMarch 8, 2021 at 1:46 pm #1286440hey mike you can find here account info: https://kriesi.at/support/topic/customized-lightbox-markup/#post-1286046
I had understood him/her to mean that different ALB elements should form a gallery with images in a common lightbox. Also the images that were inserted in a text box, for example.
March 11, 2021 at 12:43 pm #1287402Hi,
@Guenni007, thanks for sharing, very cool, I also see @hersbers finds this to be a success.Best regards,
Mike -
AuthorPosts
- You must be logged in to reply to this topic.