-
AuthorPosts
-
October 17, 2014 at 2:21 am #337073
Hi-
My gallery lightbox enlargements are showing the alt and not the title at the top above the image, how do I make it so that the title shows and not the alt. The only place the alt should show is in the code.
Thanks!
-DOctober 20, 2014 at 3:25 pm #338378Hey jollyrogerd!
in WordPress the alt text is always showing in gallery lightbox. If you don’t want that, you need to deactivate the alt text or the title should be the same as the alt text.
Cheers!
AndyOctober 20, 2014 at 7:54 pm #338579Hi Andy-
For SEO reasons, they want to alt in the code but not showing. Is there any way for the enlargements to show the title and not the alt? The roll overs with the thumbnails show the title not the alt…
Thanks!
-DOctober 22, 2014 at 4:08 am #339338Hi!
Can you post a link to your gallery page please?
Cheers!
JosueOctober 22, 2014 at 8:09 pm #339708Here it is: http://www.curos.com/clinical/gallery/
Thanks!
-DOctober 22, 2014 at 8:35 pm #339731Hi,
Try adding this at the very end of your theme functions.php file:
function add_custom_script(){ ?> <script> jQuery(window).load(function(){ jQuery('.avia-gallery a img').each(function(){ jQuery(this).attr('alt', jQuery(this).data('avia-tooltip')); }); }); </script> <?php } add_action('wp_footer', 'add_custom_script');
Regards,
JosueOctober 22, 2014 at 11:48 pm #339821Hi Josue-
That does make the title show on the enlargement page but the alt text in the code now displays the title and I need the alt text to show the alt text in the code for SEO purposes…. Please advise.
Thanks!
-DOctober 23, 2014 at 12:07 am #339827Hi!
That won’t be affected, this change is only made on the client side, if you go to the source (this is what bots read) you’ll still see the alt tag showing the alt text – http://screencast.com/t/8V6jozrdKN
Cheers!
JosueOctober 23, 2014 at 2:38 am #339897Hi Josue-
This is how its showing on Firefox and Safari, why the discrepancy?
https://www.dropbox.com/s/59bbe7tq3arwf48/Screen%20Shot%202014-10-22%20at%205.35.58%20PM.png?dl=0
-DanicaOctober 23, 2014 at 3:35 am #339918Hi Danica,
That’s correct, you are seeing the source via Firebug, after the JavaScript mod has run, try checking it here – http://i.imgur.com/trsKJpI.png
Best regards,
JosueOctober 24, 2014 at 1:24 am #340388Hi Josue-
Got it, thanks for your help!
-DOctober 24, 2014 at 2:40 am #340401You are welcome Danica, glad to help :)
Regards,
Josue -
AuthorPosts
- The topic ‘Lightbox showing alt not title’ is closed to new replies.