Okay
  Public Ticket #2801847
Masonry Single Portfolio Image Hover
Closed

Comments

  •  4
    cknoblich started the conversation

    Hello. I use the VisualComposer Masonry Element with the Kalium Lightbox. Unfortunately, the settings for the Kalium Lightbox from Theme Options dont apply. How do I remove the file name from mouse hover over an image? Greetings.

  • [deleted] replied

    Hi cknoblich,

    Can you please send me your site URL first? I need to investigate your site and then get back to you if I have a possible solution.

    Thanks!

  •  4
    cknoblich replied

    Hello Ylli,

    my page is not open to the public. But my question is a general one, not site specific. I just want to know how I remove the the file name from mouse hover over an image in Kalium lightbox, used as WPBakery VisualComposer Masonry element.

  • [deleted] replied

    Can you please send us a screenshot of this behavior?

    [EDIT]

    If you are talking about a thing like this:

    medium
    (view on a new page)

    then this is a default browser behavior that we can't change.

    The image takes the alt text that you have added in that image.

    medium
    (view on a new page)

    Thanks!

  •  4
    cknoblich replied

    I have worked with WordPress for a lot of years now. This is NOT a browser specific issue. I have tons of sites with other themes, that do not show the alt-text on hover. So please tell me which part of your script or code I have to remove this.

    [EDIT]

    Besides that, here in my screenshot, you can see that it is not even the alt text, but the image title that is showing on hover. I don't have alt-text.

    Please provide me with instructions how to remove this behavior. 

  • [deleted] replied

    Hi cknoblich,

    I found some articles that might help you to remove that browser behavior.

    Have a nice day!

  •  4
    cknoblich replied

    I did all of the above and it does not work. This is a Theme specific problem and I need a proper solution please.

  • [deleted] replied

    Hi cknoblich,

    Please add this PHP code to your functions.php file.

    add_filter( 'wp_get_attachment_image_attributes', function ( $attr ) {
       unset( $attr['title'] );
       return $attr;
    } );

    I tried that and it worked for me.

    Have a nice day!

  •   cknoblich replied privately
  • [deleted] replied

    Hi,

    I have analyzed the issue and found that the titles are append by WPBakery and they do not provide any direct way to remove them. However based on their JS API I have added this code snippet that works fine on removing title attribute from links:

    <script>
    jQuery( window ).on( 'grid:items:added', function( e, items ) {
        jQuery( items ).find( '.vc_gitem-link' ).removeAttr( 'title' );
    } );
    </script>
    
    I've added it in Theme Options:

    medium
    (view large image)

    The result:

    medium
    (view large image)

    Any time you want to enable titles, just remove this code.

    I hope you like it.

  •  4
    cknoblich replied

    Finally, thank you!!! Works like a charme.

  • [deleted] replied

    I'm happy that this is now resolved and you are happy with the resultssmile.png

    Have a nice day!

    P.S: If you like the theme, it would help us a lot if you could give us a five-star rating on Themeforest from your Downloads tab.

    A huge thank you from me and Laborator in advance.