Tagged: 

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1411259

    Hi,

    this is mentioned in the documentation:

    It is a browser feature but it is possible to hide them by adding following code to Functions.php file of your child theme in Appearance > Editor

    function remove_title_attr(){
    ?>
     <script>
    jQuery(window).on('load', function(){
    jQuery('#wrap_all a').removeAttr('title');
    jQuery('#wrap_all img').removeAttr('title');
    });
     </script>
    <?php
    }
    add_action('wp_footer', 'remove_title_attr');

    so far so good, but:
    with this active, the lightbox of Masonry Gallery for example show no image title. When disabling this function, then the title of the images are shown in the lightbox.

    Is there a workaround so that this feature can be ACTIVE and STILL display the image titles in the lightbox?
    Thanks.

    #1411334

    Hey BeeCee,

    Thank you for the inquiry.

    The value of the title attribute is actually used in the lightbox container, so removing the title will also affect the lightbox. Another user posted a script that only removes or hides the title on mouse hover and brings it back on mouse out. Please check the thread below.

    // https://kriesi.at/support/topic/hide-titles-and-descriptions-when-you-hover-on-images-or-thumbnails-in-masonry/#post-1377091

    Best regards,
    Ismael

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