-
AuthorPosts
-
October 1, 2020 at 2:20 pm #1249885
Is there a way to remove the link on an image when it is opened and viewed in light-box mode so you don’t go to the next image? I have already removed the previous/next arrows, but just want the image to open and not have a link on it.
Below is an example. If you click on the product image on the left, you can click on it to view the 3D view of it that is also linked below. I’d like to not have the image be linked and the user just close it out, then click on the “3D View” link to open the 3D version.
Thanks!
October 6, 2020 at 9:36 am #1250775Hey NicomIT,
Thank you for the inquiry.
We could disable the link of the Image element in its Advanced > Image Link Settings toggle, and set the Image Link? settings to the very first option (No Link).
Best regards,
IsmaelOctober 6, 2020 at 1:06 pm #1250838Hi Ismael,
Unfortunately, I don’t think that will work. We still need users to be able to click on the image in the page and open the larger version in the light box view. So if we change the setting to ‘No Link’, then it won’t do that. The issue specifically is the link on the image once it is opened in light box view and being able to click on it and go to another item. Is there a way to disable that or remove it?
Thanks.October 8, 2020 at 11:43 am #1251381Hi,
Thank you for the update.
Would you like to remove the lightbox navigation? This css code should work.
.mfp-arrow { display: none !important; }
Best regards,
IsmaelOctober 8, 2020 at 3:46 pm #1251456Hi Ismael,
I actually already have that disabled. What I need to do is have no link on the image itself.Ryan
October 9, 2020 at 2:05 pm #1251707Hi,
Thank you for the clarification.
We did not find any link tag in the lightbox container, so the link is probably controlled by the lightbox script. We could try this css code to disable the image link and set the mouse cursor to default.
img.mfp-img { pointer-events: none !important; cursor: default; } .mfp-figure figure { margin: 0; cursor: default; }
Best regards,
IsmaelOctober 14, 2020 at 7:38 pm #1252822Thanks Ismael. It looks like that works – when I click on the product photo, it no longer has a link on it. However in Firefox when I click on the “3D View” button it opens that in a new tab in addition to the lightbox view.
October 19, 2020 at 12:22 pm #1253921Hi,
The 3D View button or link has a target attribute which is set to “_blank”. Did you configure it to be that way? To prevent it from opening in a new tab, you have to remove the target attribute.
Thank you for your patience.
Best regards,
IsmaelOctober 20, 2020 at 3:20 pm #1254389Hi Ismael.
It looks like that was the issue. I think when I was originally trying to get the 3D button to open something in a light box, the shortcode I found had that target attribute in it for some reason. It didn’t do anything before making the changes we discussed here, so it wasn’t opening the 3D model in a new window earlier. It’s all good now. Thanks for the help.
RyanOctober 21, 2020 at 1:26 am #1254505Hi,
Did you need additional help with this topic or shall we close?
Best regards,
Jordan ShannonOctober 21, 2020 at 1:16 pm #1254647I’m good. You can close it now. Thanks for checking.
October 22, 2020 at 6:42 am #1254843Hi,
If you need additional help, please let us know here in the forums.
Best regards,
Jordan Shannon -
AuthorPosts
- The topic ‘Remove Link on Image When Viewed in Lightbox View’ is closed to new replies.