1. CYBER MONDAY SALE Get Divi.Help Pro Membership @ $99 / lifetime & instantly gain access to all our Divi.Help Pro Membership perks.LEARN MORE
Dismiss Notice
NEW Divi.Help Pro Carousel AI Toolkit - Magically turn your Divi design into carousel, simply by using our online toolkit. No plugins needed.Try our carousel AI toolkit
BEST Divi Block - A revolutionary drag & drop tool to easily mix & match 960+ premade blocks (Light & Dark) to kick start your Divi site design. Special module designs are included as well. Also newly added AI generator & color.
Learn More About Divi BlockFree Version ~ 340+ Free Blocks

Disable Divi lightbox when using alternative lightbox

Discussion in 'Free Divi Community Forum' started by Kris, Dec 16, 2019.

  1. Kris

    Kris New Member

    I am working on a site with photos of works of art.
    To zoom in to the images, I have found a suitable lightbox plugin: Lightbox with PhotoSwipe
    It will open any image, that has a link to itself, in a lightbox.
    Using the 'Open in lightbox' option on an image will add that link.
    However this causes the image to open in Divi's built-in lightbox and the alternative lightbox at the same time.
    I have been trying hard to disable Divi's built-in lightbox, so only the alternative lightbox is displayed, but I have had no success.

    The issue can be seen here:
    https://sh-kunst.elektrisk.dk/artwork/livets-trae-yggdrasil/

    The Image opens in the alternative lightbox on top of Divi's lightbox, so when you close the alternative lightbox, Divi's Lightbox stays open.

    How can I disable Divi's lightbox, so it does not open in the first place?

    Best Regards
    Kris
     
    1. PRO MEMBER PERKS Divi Block Pro - Premade testimonial carousel design for your Divi site without using any plugins:View Demo
  2. Divi.Help

    Divi.Help Administrator
    Staff Member

    Try to use Text module instead.

    In the content area, click Add Media > Create Gallery > Select your images > Create New Gallery > Link to Media File & done.
     
  3. Kris

    Kris New Member

    The method works fine. Thank you for your insight.

    However it does not solve the issue completely in my case.
    In my post, the image in question is inserted in a Theme Builder Template Layout and is populated by the Featured Image of the post as Dynamic Content.
    This is a good solution since it will be easy for another person to add new posts to the site when the post design process does not require too many workarounds.
    The Gallery-in-text-module-method unfortunately does not allow the use of Dynamic Content.

    Can you think of another way to suppress display of the built-in Divi lightbox?

    I am sorry if I am too demanding, but I have run out of imagination on this problem.
     
    1. PRO MEMBER PERKS Divi Ultimate Header Plugin - Add more varieties for your Divi header (12 premade styles) + menu hover effects:Learn More
  4. Divi.Help

    Divi.Help Administrator
    Staff Member

    Don't have any further advice on that. You may refer to official Divi support about it & see what they say: https://www.elegantthemes.com/members-area/help/
     
  5. Moose

    Moose New Member

    Hi Kris, I ran across your post recently while looking for a way to do the exact same thing. After several conversations with some very helpful people and some experimentation on my part, I have found a solution.

    You can turn off the Divi Lightbox by going into the page settings (the gear icon to the right of the X in the Visual Builder) and adding the following css under the Advanced Tab, Custom CSS:

    Code:
    Log In or Sign Up to view this code.
    Unfortunately, you would need to add that to each Gallery page, I haven't found a way to turn it off site wide in the Child Theme CSS.

    Also, if you want to have a semi transparent background similar to the original Divi Lightbox you can add this to your Child Theme CSS

    Code:
    Log In or Sign Up to view this code.
    Hope this helps!
     
    #5 Moose, Aug 18, 2020
    Last edited: Aug 18, 2020
    1. PRO MEMBER PERKS Divi Block Pro - Premade horizontal timeline design for your Divi site without using any plugins:View Demo
  6. RobertaFerrari90

    RobertaFerrari90 New Member

    Hi Moose thanks for the code, i was looking for this solution too...but unfortunately it's like some stuff of the divi lightbox still remains on the page. Infact when i close my other lightbox, the page scroll bar is still hidden as it usually does when the divi lightbox is open, to see the scroll-bar again i have to clic "esc" on my keyboard. Does this happen to you too? Did you find a solution?

     
  7. Sonnel

    Sonnel New Member

    Hi Moose, thanks for the code - it works. Only problem now is that after I zoomed in on an image I am unable to scroll down the rest of the page. Would you be able to help? Thanks, Sonnel
     
    1. PRO MEMBER PERKS Divi Ultimate Footer Plugin - Custom global Divi footer (20 premade styles) + Revealing footer effect:Learn More
  8. Chapi

    Chapi New Member

    Hi Sonnel,
    Did you solve the problem? I’m also looking for a solution...
    Thanks
     
  9. Chapi

    Chapi New Member


    Hi,
    I added the following css on the page concerned :

    html.js {
    overflow: unset !important;
    }

    and the scroll becomes possible again.
     
    1. PRO MEMBER PERKS Divi Block Pro - Premade testimonial carousel design for your Divi site without using any plugins:View Demo
  10. KunKuMan

    KunKuMan New Member

    I tried using the code above and everything seemed to work fine using the EverlightBox plugin.

    But with one issue... it only works once. If you close the gallery and try to open it again, nothing happens. You have to reload the page, to get it to open again.

    Any workarounds ...Thanks