Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #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?

    #302466

    I’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?

    #303002

    Hi,

    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,
    Josue

    #762076

    Hi, 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.
    #762199

    Hi,

    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 Torvik

    #762234

    HI, 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!

    #763459

    Hi,

    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,
    Nikko

    #763594

    Hi, 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.

    #763607

    Hi,

    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,
    Nikko

    #763612

    ah, 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.

    #763623

    Hi,

    Yes, we very sorry for the inconvenience but at the moment there’s no easy way to do it :(

    Regards,
    Nikko

Viewing 11 posts - 1 through 11 (of 11 total)
  • You must be logged in to reply to this topic.