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

    #1080131

    Hey CADCOM,

    Best regards,
    Victoria

    #1080269

    Hi Victoria,

    Yes you are right, the link does open the first link of the gallery in the lightbox.
    Thank you for your help
    Best regards

    #1080393

    I 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

    #1080484

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

    #1083061

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

    #1083985

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

    #1084942

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

    #1085063

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

    #1085088

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

Viewing 10 posts - 1 through 10 (of 10 total)
  • The topic ‘A buton linked to a media gallery’ is closed to new replies.