Tagged: Lightbox
-
AuthorPosts
-
October 21, 2014 at 10:25 am #338934
Hey!
I upload most of my images at 1200px width so that when lightbox is activated you can see it at the same width than the site width.
But indeed when you open an image in a lightbox it’s stretched to 1030px width.
I’m using lightbox in different pages of the site.
Is there a way to have images at 100% width when opened in a lighbox ?
Thanks a lot.
Cheers!
MarieOctober 22, 2014 at 6:46 pm #339661Hey Marie!
Try adding this to your theme / child theme functions.php:
function change_lightbox_size() { return "full"; } add_filter('avf_avia_builder_helper_lightbox_size','change_lightbox_size', 10);Cheers!
JosueOctober 23, 2014 at 6:45 am #339930Works perfectly! Thanks a lot Josue!
Cheers!Marie
October 23, 2014 at 6:48 am #339931Oops I talked too fast. It works perfectly but not for the portfolio grid (“Espace Media” page)….
Thanks !
MarieOctober 23, 2014 at 4:43 pm #340192Hi Marie,
Open /enfold/config-templatebuilder/avia-shortcodes/portfolio.php and look for line 386:
case "lightbox": $link = wp_get_attachment_image_src(get_post_thumbnail_id($the_id), 'large'); $link = $link[0]; break;Replace it by this:
case "lightbox": $link = wp_get_attachment_image_src(get_post_thumbnail_id($the_id), 'full'); $link = $link[0]; break;Regards,
JosueOctober 23, 2014 at 5:44 pm #340252For info this is NOT urgent at all…
———————————–Thank you for your feedback Josue!
Gonna try that. Just wondering if I could rather put this line in my child theme so that I don’t have to change the enfold native file each time the theme is updated… but you would probably have told me… ? Just in case… let me know, and how (functions.php ? duplicate portfolio.php ?).Thank you again.
Cheers,
MarieOctober 23, 2014 at 7:34 pm #340302Hey!
You don’t have to worry about that, in the next update the solution i provided here should work for the Portfolio too.
Best regards,
JosueOctober 24, 2014 at 7:45 am #340484OK then thanks Josue!
Made the change in /enfold/config-templatebuilder/avia-shortcodes/portfolio.php – line 386, and it works perfectly :)Thank you again.
Regards,Marie
October 24, 2014 at 4:26 pm #340671You are welcome Marie, glad to help :)
Regards,
Josue -
AuthorPosts
- The topic ‘Lightbox width not set at 100% ?’ is closed to new replies.
