-
AuthorPosts
-
October 26, 2020 at 2:05 pm #1255712
Hello enfold Support,
we are currently trying to disable the gallery of a lightbox on a specific page.
On the page, we have two lightboxes, the first opens when someone clicks “Express-Anfrage”, this is a custom lightbox we created ourselfs and works as intended.
The second lightbox opens, when you click the image below “Die perfekte Warenkorb-Optimierung”.
This lightbox has a gallery navigation and can switch between both lightboxes.
The content of those two lightboxes hav nothing to do with each other so it seems kinda weird if you can switch between them with the navigation.
Is there some way we can add the lightbox without being able two switch between the two lightboxes?This is how we add the second lightbox
[av_image src='https://www.econsor.de/wp-content/uploads/2020/10/2020-10-20-warenkorb.png' attachment='54817' attachment_size='full' copyright='always' caption='' styling='' align='left' font_size='' overlay_opacity='0.4' overlay_color='#000000' overlay_text_color='#ffffff' animation='no-animation' hover='' appearance='' lazy_loading='disabled' link='lightbox' target='' title_attr='' alt_attr='' id='' custom_class='post-entry' av_element_hidden_in_editor='0' av_uid='av-kb7m38' admin_preview_bg=''][/av_image]Thanks in advance
GerryOctober 30, 2020 at 6:42 am #1256981Hey emilconsor,
Thank you for the inquiry.
By default, the lightbox script will include all images in the page unless they are specifically grouped into sets. What we could do is disable the lightbox arrows or navigation with css to prevent the users from switching from one image to another.
Please add this css code in the Quick CSS field or the child theme’ style.css file.
.single button.mfp-arrow { display: none !important; }
Best regards,
IsmaelOctober 30, 2020 at 4:20 pm #1257068Hi Ismael,
that solution doesn’t really help me, because you can still click on the image itself to switch to the next lightbox.
Furthermore the 1/2 is also visible.
Is there some way to remove the gallery function completely or at least to deactived the switch.
How do we group the lightboxes into two different sets?Kind regards
GerryNovember 2, 2020 at 4:20 am #1257496Hi,
Thank you for the update.
We could manually disable the image click and the navigation options for the gallery module, but this will have to be done directly in the lightbox script or file, so using css is still the better option.
Please add this css code to disable the image click and the image counter.
img.mfp-img { pointer-events: none; } .mfp-counter { display: none !important; }
If you want to edit the script file directly, please check this documentation.
// https://dimsemenov.com/plugins/magnific-popup/documentation.html#options
The lightbox script is inside the enfold\js\avia-snippet-lightbox.js file.
Best regards,
IsmaelNovember 2, 2020 at 2:13 pm #1257598Hi Ismael,
that CSS snippet worked.
Thank you for your helpKind Regards
GerryNovember 3, 2020 at 1:21 am #1257814Hi,
Did you need additional help with this topic or shall we close?
Best regards,
Jordan Shannon -
AuthorPosts
- You must be logged in to reply to this topic.