• Resolved Chris

    (@osiak)


    Is there a way (snippet/filter) to disable to lightbox functionality on mobile devices? On mobile you can zoom by pinch-and-zoom manual option so the lightbox has less sense. So I’d prefer to disable this based on screen width. Possible?

Viewing 1 replies (of 1 total)
  • Plugin Author Archetyped

    (@archetyped)

    Hi, you could use SLB’s slb_is_enabled (source) filter hook to enable/disable SLB based on your own custom conditions. WordPress’ wp_is_mobile() (documentation) may be useful as well.

    However, note that SLB only controls whether a lightbox is displayed when a link is clicked. The image links you added to your posts will still be there, so if SLB is disabled on mobile devices, visitors will be redirected to the image file (instead of a lightbox on the same page) when they click the links.

Viewing 1 replies (of 1 total)
  • The topic ‘Disable lightbox on mobile’ is closed to new replies.