Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #668919

    I am using the standard Masonry gallery to show covers of PDF files. What I would like is to add a download button, linked to the PDF file, underneath the caption text when it is opened in the lightbox. Is there a way to achieve this?

    Edit: I added some html to the Description field of the image and now a link shows up underneath the picture when it is opened in the lightbox. Annoying is that the html is now showing up in the tooltip when you hover over the image. I tried some plugins that kill the tooltip but that will also kill the link underneath the image. Anyone has an idea on how to resolve this?

    • This topic was modified 7 years, 8 months ago by winnieandbuzz.
    #669397

    Hey winnieandbuzz,

    Could you provide us with a link to the site in question so that we can take a closer look please?

    Thanks,
    Rikard

    #669406

    Would love to share a link but the website is currently “under construction” and only a landing page is showing. Instead I made two screen recording of which I hope they will be useful.

    The first screen recording shows the standard behavior with the tooltip upon hovering etc.

    The second screen recording shows what I am looking for with a download button below the lightbox. Issue here is that the HTML will also show up in the tooltip. I added the HTML in the image description field.

    As a side note, I thought the alt_text of a picture should be used for the tooltip and not the description?

    #670873

    Hi,

    You can turn on custom CSS field for ALB elements – kriesi.at/documentation/enfold/turn-on-custom-css-field-for-all-alb-elements/ and then edit your Masonry Gallery and give it a custom CSS class and then add following code to Functions.php file in Appearance > Editor to remove the tooltip on that element

    function remove_title_attr(){
    ?>
     <script>
    jQuery(window).load(function(){
    jQuery('.your-custom-class a').removeAttr('title');
    jQuery('.your-custom-class img').removeAttr('title');
    });
     </script>
    <?php
    }
    add_action('wp_footer', 'remove_title_attr');

    Best regards,
    Yigit

    #672635

    Thanks, it look some time to digest the info provided (I am a newbie) but this works great.

    #672664

    Hey!

    You are welcome!
    For your information, you can take a look at Enfold documentation here – http://kriesi.at/documentation/enfold/
    And if there are features that you wish Enfold had, you can request them and vote the requested ones here – https://kriesi.at/support/enfold-feature-requests/
    For any other questions or issues, feel free to post them here on the forum and we will gladly try to help you :)

    Best regards,
    Yigit

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Adding a download button below an image that is opened in the lightbox’ is closed to new replies.