Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #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!
    -D

    #338378

    Hey 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!
    Andy

    #338579

    Hi 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!
    -D

    #339338

    Hi!

    Can you post a link to your gallery page please?

    Cheers!
    Josue

    #339708
    #339731

    Hi,

    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,
    Josue

    #339821

    Hi 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!
    -D

    #339827

    Hi!

    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!
    Josue

    #339897

    Hi 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
    -Danica

    #339918

    Hi 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,
    Josue

    #340388

    Hi Josue-
    Got it, thanks for your help!
    -D

    #340401

    You are welcome Danica, glad to help :)

    Regards,
    Josue

Viewing 12 posts - 1 through 12 (of 12 total)
  • The topic ‘Lightbox showing alt not title’ is closed to new replies.