-
AuthorPosts
-
November 12, 2018 at 8:27 am #1032461
Hi, I’ve tried this snippet in docs, but it does not work. The image titles are ever on the mouse over
Thanks<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');
November 13, 2018 at 9:01 pm #1033169Hey czar,
The beginning of the code is missing in this snippet, are you using just this?
Can you give us temporary admin access to your website in the private content box below, so that we can have a closer look?
Best regards,
VictoriaNovember 13, 2018 at 9:13 pm #1033171Sorry Victoria, I posted the code badly.
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');
and it does not work anyway
- This reply was modified 5 years, 10 months ago by czar.
November 14, 2018 at 5:38 pm #1033584Hi czar,
Can you give us temporary admin access to your website in the private content box below, so that we can have a closer look?
Best regards,
VictoriaNovember 14, 2018 at 5:56 pm #1033593Thanks Victoria, token in private data is valid 7 days
November 15, 2018 at 8:54 pm #1034132Hi czar,
Best regards,
VictoriaNovember 16, 2018 at 12:04 am #1034180Hi Victoria you’re right, sorry.
- This reply was modified 5 years, 10 months ago by czar.
November 19, 2018 at 12:38 pm #1035153Hi czar,
I have modified your code in Remove title attributes which you added in Snippets to:
function remove_title_attr(){ ?> <script> document.addEventListener("DOMContentLoaded", function(event) { var links = document.querySelectorAll("#wrap_all a"), images = document.querySelectorAll("#wrap_all img"); [].forEach.call(images, function(image) { image.removeAttribute('title'); }); [].forEach.call(links, function(link) { link.removeAttribute('title'); }); }); </script> <?php } add_action('wp_footer', 'remove_title_attr');
Let us know if you need further assistance.
Best regards,
NikkoNovember 19, 2018 at 1:32 pm #1035174Hi Nikko, now work perfecly
many thanksNovember 19, 2018 at 1:53 pm #1035181uhmm i have imported this snippet on another site, but not hide title.
If you want to check there is a token in private data, valid for 7 days
thanksNovember 20, 2018 at 7:00 pm #1035733Hi czar,
Masonry elements are not images or links and so the code does not affect that page. I adjusted the code. Please check.
Best regards,
Victoria -
AuthorPosts
- You must be logged in to reply to this topic.