Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #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!

    #1286102

    Hey 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,
    Mike

    #1286238

    can 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.

    #1286249

    sorry – just brainstorming to exclude files of a gallery from that group

    • This reply was modified 3 years, 8 months ago by Guenni007.
    #1286355

    Danke, Guenni007! Funktioniert perfekt!

    Thank you, Guenni007! Works perfectly!

    #1286437

    Hi,
    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,
    Mike

    #1286440

    hey 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.

    #1287402

    Hi,

    @Guenni007
    , thanks for sharing, very cool, I also see @hersbers finds this to be a success.

    Best regards,
    Mike

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.