
-
AuthorPosts
-
May 12, 2025 at 5:56 pm #1484105
Hi,
– Is there a way to change the lightbox size? The picture is a bit small on mobile when it is horizontal.– Is it possible to block the scroll when the lightbox is open?
Thanks!
-
This topic was modified 2 weeks, 6 days ago by
spray.
May 13, 2025 at 5:44 am #1484127Hey Pierre,
Thank you for the inquiry.
You can add this filter to the functions.php file to adjust the thumbnail size used in the lightbox container.
function avf_alb_lightbox_image_size_mod($size) { return "full"; } add_filter('avf_alb_lightbox_image_size', 'avf_alb_lightbox_image_size_mod', 10, 1);
To disable scrolling when lightbox is active, use this code in the Quick CSS field.
.mfp-zoom-out-cur { height: 100vh; overflow: hidden; } .mfp-bg { height: 100vh !important; }
Best regards,
IsmaelMay 13, 2025 at 10:11 am #1484140Hello,
for the thumbnail size i managed it, thanksBut for the scroll, it doesn’t work for me with you code.
i put this instead and it seams to be OK:
.mfp-wrap.mfp-gallery.mfp-close-btn-in.mfp-auto-cursor.avia-popup.mfp-zoom-in.mfp-ready {
top: 0 !important;
position:fixed!important;
}What do you think about it?
May 14, 2025 at 6:49 am #1484195Hi,
i put this instead and it seems to be OK:
We tested it on our end but it didn’t work. Try to add this script in the functions.php file instead:
add_action( 'wp_footer', 'av_custom_script_mod', 100 ); function av_custom_script_mod() { ?> <script> jQuery(document).ready(function($) { $(document).on('click', '.lightbox-added', function () { setTimeout(function() { if ($('body').hasClass('mfp-zoom-out-cur')) { $('html').css('overflow', 'hidden'); } }, 100); }); $('.lightbox-added').on('mfpClose', function () { $('html').css('overflow', ''); }); }); </script> <?php }
Best regards,
IsmaelMay 14, 2025 at 7:41 am #1484210Hi,
Your code doesn’t work on mobile but on laptop it’s fine because i dont see anymore the scroll bar.May 15, 2025 at 7:45 am #1484280Hi,
Have you tried switching to incognito mode or completely removing the browser history on your phone? Please provide the site URL in the private field so we can check it properly.
Best regards,
IsmaelMay 17, 2025 at 4:16 pm #1484377Hello,
Sorry for the late answer
By using your code and mine, it’s ok but if you can have a look of course i would appreciate!May 19, 2025 at 9:12 am #1484426Hi,
Thank you for the update. It seems to be working correctly when we checked.
Best regards,
IsmaelMay 19, 2025 at 8:54 pm #1484465Hello,
Yes because i didn’t remove this in my css:.mfp-wrap.mfp-gallery.mfp-close-btn-in.mfp-auto-cursor.avia-popup.mfp-zoom-in.mfp-ready {
top: 0 !important;
position:fixed!important;
}with just the code you send to me it seems that it doesn’t work on mobile (if i remove my Css)
May 20, 2025 at 6:28 am #1484473Hi,
Feel free to keep the css if it works on your end. Let us know if you need anything else.
Best regards,
IsmaelMay 22, 2025 at 6:37 pm #1484589Hi,
Ok, i will let it like this!Thanks for your help!
Have a nice day!!
-
This topic was modified 2 weeks, 6 days ago by
-
AuthorPosts
- You must be logged in to reply to this topic.