Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
  • #166583

    Hi there,
    This is the website in question:

    I have a couple of issues unsolved, even after updating the wordpress version and the latest theme updates:

    1. The lightbox on portfolio items shows too many images (for example 26 instead of 13) and when moving forward inside the lightbox the images are shown twice…
    I also followed the instructions on
    but with no success – there are still duplicated images on lightbox.

    2. Also when entering one of the portfolio items on android phones or iphones (for example the first one – “The Time Elapsed Between Two Frames”), the images that have captions with more than 3 rows of text show only 3 rows and cut off the rest of the caption text. This is a screenshot example:
    The text should say: “Mother Sharon with parents in law Haray and Menashe on the bottom,1986. Daughter Ella with grandparents Haray, and Menashe on the top, 2012.”

    Hope you can help me with these issues.

    • This topic was modified 6 years, 2 months ago by  tkwsniva.

    Any suggestions?



    1) Actually this is the intended behavior because you added the same images twice to the same page. Each image is part of the slideshow and part of the “View all” gallery on the right side. Thus two links point to the same images and the lightbox will add both images to the gallery . I searched for a quick solution and this thread: may help you because it tells you how to add a rel attribute to the gallery links. Insert following code at the bottom of functions.php

    add_filter( 'wp_get_attachment_link' , 'add_lighbox_rel' );
    function add_lighbox_rel( $attachment_link )
        if( strpos( $attachment_link , 'a href') != false && strpos( $attachment_link , 'img') != false )
            $attachment_link = str_replace( 'a href' , 'a rel="lightbox[gallery]" href' , $attachment_link );
        return $attachment_link;

    and PrettyPhoto should recognize the gallery images (View all) as a separate gallery because of the rel attribute.

    2) I didn’t notice an image description in the lightbox window at all. Did you deactivate it?



    Hi Peter,
    Thank you, but the code didn’t change the duplication… I understand what you said about the “view all” gallery. Is there any other way to overcome this in your opinion? Maybe a different method to use for the “view all” gallery?

    as for the image description – it’s under the image on the page itself, not on the light box, like in the picture that I’ve added on my first post here.

    Thanks again,



    I debugged the code now and it doesn’t work because of the “img src” string check. I changed it a bit and it should work now.

    2) Try to insert following code into the quick css field to fix the caption issue

    #top.single .slideshow {
    padding-bottom: 170px;



    Great – it works!
    Thank you very much Peter, you’ve been very helpful…


Viewing 6 posts - 1 through 6 (of 6 total)

The topic ‘Lightbox showing duplicated images and captions cut short on android and iphone’ is closed to new replies.