Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #946861

    We are currently suppressing images titles when you hover over them as this is annoying my client. We have the following code in the child functions.php file:
    <?php
    add_filter(‘avf_logo_subtext’, ‘kriesi_logo_addition’);
    function kriesi_logo_addition($sub) {
    $sub .= ‘<div class=”logo-title”>RESPECTACLE <span>COMPANY</span></div>’;
    $sub .= ‘<div class=”logo-subtitle”>Tel: 01858 433 577</div>’;
    return $sub;
    }
    $avia_config[‘imgSize’][‘featured’] = array(‘width’=>1500, ‘height’=>555 ); // images for fullsize pages and fullsize slider
    add_filter( ‘gform_enable_field_label_visibility_settings’, ‘__return_true’ );
    function remove_title_attr(){
    ?>
    <script>
    jQuery(window).load(function(){
    jQuery(‘a’).removeAttr(‘title’);
    jQuery(‘img’).removeAttr(‘title’);
    });
    </script>
    <?php
    }
    add_action(‘wp_footer’, ‘remove_title_attr’);
    ?>
    Although this works and suppresses the image tiltes on hover my client wants the titles to show in the lightbox. I have found if I remove the remove_title_attr this shows the titles in the lightbox. What we need is for the hover tiltles on the images to be removed and the lightbox titles to show can you please help.

    #947945

    Hey condonpb,

    Thank you for using Enfold.

    What you’re asking regarding the lightbox title contradicts with the previous title removal script because the lightbox requires the title attribute in order to render it below the lightbox image. I don’t think you can accomplish both. Please hire a freelance developer or contact our partner, Codeable. Maybe, they’ll be able to come up with a solution somehow. Please tell the client that the title attribute is vital for SEO.

    Best regards,
    Ismael

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.