• Resolved alexis888

    (@alexis888)


    Hello.
    I would like NOT to display the “tootip” filled with image title on hover over images from the gallery of the Instagram Widget.

    At the moment it won’t display because I edited the folowing lines in the widget file directly (wp-content>plugins>ocean-extra>includes>widgets>instagram.php ) where I removed the title attribute but I believe it’s not best practice to edit plugin files directly as I’ll have to re-do it again after every update.

    $output .= '<li><a href="' . esc_url( $link ) . '" target="' . esc_attr( $target ) . '" ><img src="' . esc_url( $item[$size] ) . '" alt="' . esc_attr( $item['description'] ) . '" title="' . esc_attr( $item['description'] ) . '" /></a></li>';

    I hope this can be done in a clean way.
    Thanks !

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Amit Singh

    (@apprimit)

    Hello,

    Kindly go to Customize > Custom CSS/JS > custom JS field and add the below code there. Clear cache and check it works or not –

    $(document).ready(function(){
      $('.oceanwp-instagram-pics').each( function(){
       $("img").removeAttr("title");
      });
    });
    Thread Starter alexis888

    (@alexis888)

    Hello, it works like a charm thank you very much !
    I just had to change $ for jQuery as I was getting an undefined error for $.

    jQuery(document).ready(function(){
      jQuery('.oceanwp-instagram-pics').each( function(){
       jQuery("img").removeAttr("title");
      });
    });

    I really need to think more about Javascript to solve my WP problems because that was obvious. Thanks a lot for your help though !

    Plugin Author Amit Singh

    (@apprimit)

    You’re welcome!

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Instagram Widget – Remove tooltip on hover’ is closed to new replies.