-
AuthorPosts
-
March 18, 2019 at 6:24 pm #1080000
Hi the team,
I have a page with 2 butons, the one link to a pdf and the second must link to the first image of a gallery. I don’t know how to make this link.
I’m sending you the link of the page in private (confidential project….)Thank you for your help !
March 18, 2019 at 10:49 pm #1080131Hey CADCOM,
Best regards,
VictoriaMarch 19, 2019 at 9:39 am #1080269Hi Victoria,
Yes you are right, the link does open the first link of the gallery in the lightbox.
Thank you for your help
Best regardsMarch 19, 2019 at 5:01 pm #1080393I tried the code of Ismael :
https://kriesi.at/support/topic/triggering-lightbox-gallery-with-link/it’s work perfectly. for the first gallery but when you’ve got differents galleries on the page, it doesn’t work correctly. Do you have a solution ?
Thank you by advance
March 19, 2019 at 7:51 pm #1080484Hi CADCOM,
You need to give different data-groups to different galleries in this case.
If you need further assistance please let us know.
Best regards,
VictoriaMarch 26, 2019 at 11:45 am #1083061Hi the team !
So, I tried all your pieces of advices and it work perfectly when the final customer can understand the JS. My customer don’t want to touch the JS code so I’m trying another solution :
I’ve made a regular Galleries for all sections. On each gallery I add the button pic like a first image so that it seem to be opened from a button.
Now I want that the gallery will open directly on the second image so that no one can see the pic of the button which is the first of the gallery. is it possible ?Thank you for your help.
March 28, 2019 at 9:45 am #1083985I’m reloading the topic.
Is anyone has an idea ? I’m searching on lighbox to docs, maybe edit a PHP function…Thank you by advance
March 30, 2019 at 7:11 pm #1084942Hi,
Sorry for the late reply, I took a look at your gallery and found that it contained the image of the red button “Photos” so I wrote this javascript to remove it from the gallery on page load, now when the lightbox is opened it will not show.
Try adding this code to the end of your functions.php file in Appearance > Editor:function remove_first_image(){ ?> <script> (function($){ $(document).ready(function(){ $( '.avia-gallery-thumb a.first_thumb[data-onclick="1"]' ).remove(); }); })(jQuery); </script> <?php } add_action('wp_footer', 'remove_first_image');
If you have this setup on more pages it should work as long as the order of the images are the same. But please check if you have other galleries that this is removing images that you do want to show the first image.
In this case we can modify it to only work on some pages, but I will need to know all the pages you want it to work on and all the pages you don’t want it to work on, and what you expect new pages to be, working or not.Best regards,
MikeMarch 31, 2019 at 1:45 pm #1085063Hi Mike
A very very big THANK YOU !!!!!!!
It work very well and it’s exactly what I wanted.For now we want the function on all galleries on the website so it’s wonderful. If one day I want it only on some galleries o nsome pages I will re-activate this topic.
Keep the good job Mike and all the team of Kriesi.March 31, 2019 at 3:06 pm #1085088Hi,
Glad we were able to help, we will close this now. Thank you for using Enfold.For your information, you can take a look at Enfold documentation here
For any other questions or issues, feel free to start new threads under Enfold sub forum and we will gladly try to help you :)Best regards,
Mike -
AuthorPosts
- The topic ‘A buton linked to a media gallery’ is closed to new replies.