-
AuthorPosts
-
August 11, 2014 at 8:39 am #302430
Hello,
When I add an image to a page with the pagebuilder and select full size as image attachment size and set the link to Lightbox, the image is linked to 1030px wide version.
How can I get it to link to the full size image?
August 11, 2014 at 11:06 am #302466I’ll answer my self..
It seems that the Lightbox will open the image in the size set via Settings > Media > Large size. When I set the large size to a bigger size and regenerated the images using this https://wordpress.org/plugins/regenerate-thumbnails/ the lightbox shows the original uploaded image (if you set Large size to be bigger).
But the downside to this is that now galleries and everything have very large images. I would prefer to have the Settings > Media > Large size in a size that isn’t too big for better user experience.
When I add an Image to the page and select Lightbox as the link type, it should open the Full size image if I have selected full size for the image attachment when selecting it from the Media library.
Why it doesn’t do that and anyway to fix it?
August 12, 2014 at 7:21 am #303002Hi,
Open /config-templatebuilder/avia-template-builder/php/generic-helper.class.php and look for line 25:
$link = wp_get_attachment_image_src($post_id, 'large');
Replace it by this:
$link = wp_get_attachment_image_src($post_id, 'full');
Regards,
JosueMarch 16, 2017 at 5:26 pm #762076Hi, this works great but how do I do it in a child theme?
thanks!
- This reply was modified 7 years, 8 months ago by dannhanks.
March 16, 2017 at 9:00 pm #762199Hi,
This link http://kriesi.at/documentation/enfold/using-a-child-theme/ should help you to learn how to create and use a child theme. If you have issues to do it, provide to me your FTP and WP credentials in a private content.
Best regards,
John TorvikMarch 16, 2017 at 10:09 pm #762234HI, I know how to use a child theme but simply copying the ”enfold/config-templatebuilder/avia-template-builder/php/generic-helper.class.php” file to the same location in the child (enfold-child/config-templatebuilder/avia-template-builder/php/generic-helper.class.php) doesn’t work.
thanks!
March 20, 2017 at 4:59 am #763459Hi,
Unfortunately it’s not applicable to all files including the one you have mentioned, you can only change this on the parent theme :(
Best regards,
NikkoMarch 20, 2017 at 12:18 pm #763594Hi, i am sure there was a way to include extra files by calling it through the child’s function file. I am sure I have done this on a project before but I can’t remember which one. I am sure a different moderator gave me some code to pull this extra file through.
March 20, 2017 at 12:34 pm #763607Hi,
I think you must be referring to this post: http://kriesi.at/documentation/enfold/add-new-or-replace-advanced-layout-builder-elements-from-child-theme/ also you can replace header.php, footer.php and other files. I haven’t tried it but I think if you duplicate the class found in generic-helper.class.php and give it another name and put it in functions.php then override the image module/element and call the duplicate class, I think that should work.
Best regards,
NikkoMarch 20, 2017 at 12:45 pm #763612ah, this seems very complicated to just replace a file in the theme. Oh well, I will just have to put a note on the updates that this will have to be manually updated each time. It’s a shame – I have been creating child themes for enfold for the past couple of years now, I almost exclusively use enfold for all my sites, this is literally the first limitiation I have found.
The main reason for me wanting to do this is that I am using a lightbox image on a gif file.
When on the page and showing the original uploaded file, the gif animated beautifully, when the lightbox is activated for it, it shows an auto generated image which doesnt have the animation as the files that wordpress/enfold create do not pass-over the animation in gifs.
I guess I could just manually replace the image that it’s calling via ftp as there are only a couple of the site, its just a bit of a pain.
March 20, 2017 at 12:55 pm #763623Hi,
Yes, we very sorry for the inconvenience but at the moment there’s no easy way to do it :(
Regards,
Nikko -
AuthorPosts
- You must be logged in to reply to this topic.