Avada Forums Community Forum Lightbox Gallery with only two feature images

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • DAV-Erlangen
    Participant
    Post count: 11

    Hello,
    I would like to implement a gallery which has many images when shown in the lightbox. However, on the actual page, there should only be few (one or two) images of that gallery visible. When the user clicks on one of the images, it opens in the lightbox and all the other gallery images are visible.

    Solutions might be:
    1. The use of a normal gallery, in case one could somehow ‘hide’ everything but the first row of that gallery.
    2. A image carousel, where the navigation is hidden. While this can easily be implemented, I have the problem that the images using the ‘fixed’ option are very small and I cannot change there size. (See https://theme-fusion.com/forums/topic/image-carousel-custom-height/#post-509378 )

    Does anyone see a solution for this?

    Best regards.

    DAV-Erlangen
    Participant
    Post count: 11

    I now found a quick-and-dirty solution for option (1.). I add a class called ‘gallery-only-first-2-images’ to the specific gallery element.
    Then, I added the custom CCS:
    .gallery-only-first-2-images :nth-child(n+3){
    display:none !important;
    }

    This removes all but the first to images on the page but leaves all images in the lightbox. Perfomance might be bad and this is only tested in current Firefox.

    Looking forward to any help on this.

    Best.

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