-
AuthorPosts
-
February 22, 2016 at 4:49 pm #587267
Hi,
I already posted this issue in a different post: https://kriesi.at/support/topic/remove-image-titles-hover-on-images-conflict/
I am using the following code:
function remove_title_attr(){ ?> <script> jQuery(window).load(function(){ jQuery('.flex_column a').removeAttr('title'); jQuery('.flex_column img').removeAttr('title'); }); </script> <?php } add_action('wp_footer', 'remove_title_attr');
However, these tags are still showing up in some other parts of the website.
How to disable them across all images in all parts of the website?
If possible, please add the full code to replace the one above.
Please check the page in PVTFebruary 24, 2016 at 5:51 am #588139Hey sitesme!
Thank you for using Enfold.
Please replace it with this:
// remove img title add_action('wp_footer', 'ava_custom_script_title'); function ava_custom_script_title(){ ?> <script type="text/javascript"> (function($) { $('img').removeAttr('title'); })(jQuery); </script> <?php }
Best regards,
IsmaelFebruary 29, 2016 at 2:17 pm #590740Unfortunately the title tags are still showing up. Please check the page in PVT.
I have this in my functions.php file, can I remove all this and get just one single code that removes all the tags from all parts of the website when mouse hover?
function add_custom_script(){ ?> <script> jQuery(window).load(function(){ jQuery('img').removeAttr('title'); }); </script> <?php } add_action('wp_footer', 'add_custom_script'); // remove img title add_action('wp_footer', 'ava_custom_script_title'); function ava_custom_script_title(){ ?> <script type="text/javascript"> (function($) { $('img').removeAttr('title'); })(jQuery); </script> <?php }
February 29, 2016 at 2:24 pm #590746Hi!
Do you mind creating a temporary admin login and posting it here privately?
Best regards,
YigitMarch 3, 2016 at 9:02 am #592488Hi Yigit,
I am a bit confused with the amount of code on functions.php and would prefer to start from scratch.
Could you please tell me a code that will replace all the previous code I added in the past, to simply hide all alt / meta tags from all images throughout the whole theme on mouse hover? This means in all images from galleries, slideshows and regular images.
Many thanks
March 7, 2016 at 7:17 am #594097Hi Yigit,
Please find the temporary access to a demo WP account below.
When mouse is hover the images, it shows the image meta name. We would like to hide all from all pictures / galleries, etc.Thank you
March 9, 2016 at 8:53 am #595376Hi!
Alright. We modified the code a bit. Please check the page now.
Cheers!
Ismael- This reply was modified 8 years, 8 months ago by Josue.
March 9, 2016 at 9:04 am #595387Hi Ismael,
Thank you.
Please check my message in PVT and also confirm what was changed exactly? Only the functions.php file with all this code?
// remove img title add_action('wp_footer', 'ava_custom_script_title'); function ava_custom_script_title(){ ?> <script type="text/javascript"> (function($) { $('img').removeAttr('title'); var a = function() { $('.avia-gallery-thumb a').each(function() { $(this).removeAttr('title'); }); } a(); })(jQuery); </script> <?php }
March 14, 2016 at 4:58 am #597507Links are removed now, and yes that’s the correct code.
-
AuthorPosts
- You must be logged in to reply to this topic.