-
AuthorPosts
-
April 21, 2021 at 10:01 am #1295738
Hi,
i would like to hide the file name of the images if hovering the masonry gallery.
I tried this:
function remove_title_attr(){
?>
<script>
jQuery(window).load(function(){
jQuery(‘#wrap_all a’).removeAttr(‘title’);
jQuery(‘#wrap_all img’).removeAttr(‘title’);
});
</script>
<?php
}
add_action(‘wp_footer’, ‘remove_title_attr’);The file name of the lightbox image is hidden but if i just hover an image – the browser always showing the file name.
How can i hide this too?
Thank you for helping!
April 23, 2021 at 2:41 pm #1296349Hi,
Thanks for contacting us!
Please add following code to bottom of Functions.php file of your child theme
function remove_title_attr(){ ?> <script> jQuery(window).load(function(){ jQuery('#wrap_all a').removeAttr('title'); jQuery('#wrap_all img').removeAttr('title'); jQuery('.av-masonry-image-container').removeAttr('title'); }); </script> <?php } add_action('wp_footer', 'remove_title_attr');
Best regards,
YigitApril 24, 2021 at 8:28 am #1296482Hi Yigit,
thank you for helping.
i put your php in my functions.php of my child theme, but it doesn’t change anything.
The image name when i hover it is still there.in private content is the link to see what i mean.
Thank you!
April 27, 2021 at 4:35 am #1296872Hi,
Thanks for the update. Please send us a temporary WordPress admin login and login URL so that we can have a closer look. You can post the details in the Private Content section of your reply.
Best regards,
RikardApril 27, 2021 at 2:10 pm #1297000Login is in private Content
April 27, 2021 at 5:33 pm #1297052Hi,
Thanks for the logins however Editor is missing under Appearance tab therefore we could not check functions.php file inside the child theme.
Could you please post FTP logins here privately as well or enable editor? :)Best regards,
YigitApril 28, 2021 at 8:14 am #1297116FTP Login is in private content.
April 29, 2021 at 9:50 am #1297275Hi,
Thanks!
Your code was not updated in functions.php file. I simply updated it to following one and that helped
function remove_title_attr(){ ?> <script> jQuery(window).load(function(){ jQuery('#wrap_all a').removeAttr('title'); jQuery('#wrap_all img').removeAttr('title'); jQuery('.av-masonry-image-container').removeAttr('title'); }); </script> <?php } add_action('wp_footer', 'remove_title_attr');
Please review your website :)
Best regards,
Yigit -
AuthorPosts
- You must be logged in to reply to this topic.