Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #322656

    Hi guys,

    I upgraded a client site to Enfold 2.9.2 and WordPress 4.0, and now the image titles in WooCommerce are no longer displaying.

    It looks like previously, the Image Title or Caption would display in the lightbox for each image, but now the Description is the only thing that is displayed (and I don’t have descriptions in any of the 2,000+ images in this site).

    Is there something that I could add to my funcitons.php to use the Title as opposed to the Description for the lightbox?

    Thanks,
    John

    #324733

    Hi,

    Try adding this at the very end of your theme / child theme functions.php file:

    function add_custom_script(){
    ?>
    <script>
    (function($){
        $(window).load(function() {
        	$(".single-product-main-image .images img").each(function(){
                    var $this = jQuery(this), theAlt = $this.attr('alt');
                    $this.parent().attr('title', theAlt);
              });
        });
    })(jQuery);
    </script>
    <?php
    }
    add_action('wp_footer', 'add_custom_script');

    Regards,
    Josue

    #324909

    Thanks Josue – that worked perfectly!

    I appreciate the assist.

    John

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Image Titles / Description Issue after 2.9.2 Upgrade’ is closed to new replies.