• Resolved getonlinego

    (@getonlinego)


    I’ve seen this on another site but can’t seem to find ‘how’ to switch this on…

    AutoPlay Button:

    <button class=”pswp__button pswp__button–autoplay hidden-xs” title=”AutoPlay”></button>

    I’m guessing this is something custom that needs to be added into the plugin itself?

    I also seem to end up having to ‘double-close’ the gallery… using: Divi Theme & Gallery module…

    Appreciate your help.

Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter getonlinego

    (@getonlinego)

    Here’s how I’d like it to work…

    https://roadstershop.com/galleries/daves-1955-chevy/

    Thread Starter getonlinego

    (@getonlinego)

    Here’s what it currently does…

    https://southernrodcustom.com/mb-65-mustang/

    Plugin Author Arno Welzel

    (@awelzel)

    There is no “autoplay” in Photoswipe. Also see: https://photoswipe.com and my test website on https://wordpress-demo.arnowelzel.de/lightbox-with-photoswipe/

    If you have seen PhotoSwipe with such a feature somewhere else, it was a custom extension and you should ask there how it was done.

    As always – pull requests on Github with working code for this additional feature are always welcome, see https://github.com/arnowelzel/lightbox-photoswipe.

    Thread Starter getonlinego

    (@getonlinego)

    Thanks Arno, I will ask them… however you missed this part:

    I also seem to end up having to ‘double-close’ the gallery… using: Divi Theme & Gallery module…

    Cheers

    Plugin Author Arno Welzel

    (@awelzel)

    If you have a “double close” gallery issue, you may have another lightbox active which also opens when clicking an image. You need to disable any integrated lightbox scripts which come with the theme, gallery plugins or Gutenberg.

    Edit: after a quick investigation on your site – yes, Divi brings it’s own lightbox which also handles clicks on images. I don’t know if or how you can disable that, but I can’t do anything in my plugin to fix this – the lightbox of the theme has to be disabled, maybe by creating a child theme which does not add its own lightbox code to the frontend output.

    • This reply was modified 4 years, 11 months ago by Arno Welzel.
    Thread Starter getonlinego

    (@getonlinego)

    I was able to disable to code by using the following:

    So to disable the lightbox on your Divi gallery, all you need to do is to add a CSS class to your gallery module. Let’s say I will name it disable-lightbox.

    Then just add the following custom CSS code to the custom CSS field in your Divi Theme Options or to your page’s settings custom CSS code (on the page on which you will have your gallery).

    .disable-lightbox a {
    pointer-events: none;
    }

    .disable-lightbox .et_overlay {
    display: none !important;
    }

    but as you mentioned above, it is connected to ‘clicking an image’ so then breaks the ability to launch Photoswipe… Looks like I’ll have to find another plugin unfortunately… Thanks

    Plugin Author Arno Welzel

    (@awelzel)

    It looks like Divi does not really support disabling the lightbox. Adding pointer-events: none does not disable it – it will just cause clicks to be ignored, but the lightbox is still there.

    Maybe you can create a child theme and just remove the lightbox frontend code there. It should be in the themes functions.php or any of the included files which enqueue the themes lightbox script.

    Plugin Author Arno Welzel

    (@awelzel)

    I mark this as resolved, since the problem is not caused by Lightbox with PhotoSwipe.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘missing autoplay button’ is closed to new replies.