Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #1103163

    Hi! Is it possible to disable the “click-through” feature when clicking on an image to enlarge it? I am inserting an image via the “media” link, and I have set it to open the full scale image when the smaller image is clicked. However, that’s all I want it to do. The default is to show all the images, on the page, each time the user clicks on the enlarged version of the photo (like a click-through gallery). I would like the user to just click the smaller image so they can see an enlarged version of the same image. That’s it. When they click it again, I want it to close (or at least not open up other images).Thanks in advance for your help!

    #1103558

    Hey webdesign,

    I’m not really sure what you’re trying to achieve, can you give us a link to the page showing what you mentioned? so we can have more context.

    Best regards,
    Nikko

    #1104203

    Yes, this is fairly straightforward. If you look at any Enfold page that has clickable images, the default is to open in Lightbox, and to allow the user to click through all of the images (each time the user clicks on the enlarged verion of the image, or clicks on the arrow). I do not want the user to see any other image, other than the one they clicked to enlarge. It is confusing to see images that may be outside of a particular element, and that may be irrelevant. I just want the image, when clicked, to enlarge, and then close on click. Here is your example theme which shows what I’m referring to (click an image, it gets larger, but then you continue to click through all the images, instead of just seeing this one image):

    Thanks!

    #1104364

    Hi,
    Please try this code in the General Styling > Quick CSS field or in the WordPress > Customize > Additional CSS field:

    .mfp-gallery .mfp-image-holder .mfp-figure {
        pointer-events: none !important; 
    }
    .mfp-gallery button.mfp-arrow {
    display: none !important;
    }

    This will remove the arrows and a second click on the enlarged image will close it.
    Please clear your browser cache and check.

    Best regards,
    Mike

    #1104366

    Beautiful! A solution to my problem. I tried removing the arrows with css earlier, which worked, but it still left the problem of clicking through. This worked perfectly. My client will be very happy. Thank you so much!!!

    #1104367

    Actually, can I ask one more favor??? Is there a way to remove the total number of photos that display in the bottom right corner? For instance, if there are 15 photos on a page, and I click the photo to enlarge, it says 1/15, etc. Since they won’t be seing any more than just that one photo, is would be great if that would not display. Thanks :)

    #1104372

    Hi,
    Please try including this css:

    .mfp-gallery .mfp-counter {
    display: none !important;
    }

    Best regards,
    Mike

    #1104374

    Yahooozy! It works right out of the box. I love it when that happens! Thanks again for your great support. This is one of the reasons I keep designing websites with your theme. Thanks again and cheers!

    #1104382

    Hi webdesign,

    We’re glad that we could help :)
    Thanks for using Enfold and have a great day!

    Best regards,
    Nikko

Viewing 9 posts - 1 through 9 (of 9 total)
  • The topic ‘Disable the "click-through" on images’ is closed to new replies.