delete title image Thumb

Delete the title that appears on an image's overview in Divi (with or without plugin)

Updated on 19/06/24

909 words

4 minutes of reading
12 comments

This article contains affiliate links recognizable by the percentage icon (%) → I am an affiliate link

You may have noticed that a widget appears on the image fly with the mouse in your Divi publications?

If you, or your client, find this boring, you will be able to solve this problem in less time than it takes to write this mini tutorial!

I'll show you two methods: with or without extension.

image hover title

Note to better understand: the bulletin appears when the internet user passes his mouse over an image of your site. This means that this is a change to Javascript. Indeed, JS is the language used to make interactions between the site and the Internet. As a result, this toolbox cannot be hidden/deleted with CSS (which is a much easier language to learn and master). This code could be changed in a child theme, but it would be much more complicated... Let's go on...

1 – Remove the image title on the mouse overhang with plugin

There are various ways in which add code in Divi, first see the method that uses the extension Snippet code.

Installer l'extension Code Snippets
  1. Go to tab Extensions > Add, seize Snippet code in the search bar.
  2. Install and activate the extension.
Cloner un snippet de Javascript
  1. Go to the tab Snippets > All extracts.
  2. Find example of Javascript extract, then click on Cloner*.
  3. You will find this clone at the bottom of the extract list. Click Modify.
image hover title code snippet 3
  1. Give your snippet a title to find it more easily in the snippet list.
  2. Instead of « Write your JavaScript code here », copy and paste the following code:
add_action( 'wp_head', function () { ?>
<script>
	
	jQuery(document).ready(function($) {
    $("img").mouseenter(function() {
        let $ld_title = $(this).attr("title");
        $(this).attr("ld_title", $ld_title);
        $(this).attr("title", "");
    }).mouseleave(function() {
        let $ld_title = $(this).attr("ld_title");
        $(this).attr("title", $ld_title);
        $(this).removeAttr("ld_title");
    });
});
	
</script>
<?php } );
  1. Choose (or keep) the option "Run only in the public interface".
image hover title code snippet 4
  1. Below the snippet, a field allows you to enter a desciption. This will allow you later to remember what this piece of code is for.
  2. Save your changes.
  3. Back in the snippet list, check that the Toggle is positioned to the right and blue. This makes your code active (if the Toggle is grayed, your code is inactive).
image hover title not display

Now go for a walk on your site... Mouse-flying widgets should be gone!

Did you know that? You can test Divi for free by visiting on this page and by clicking on "TRY IT FOR FREE"

*Important: if you do not have an example of a blank JS code that you can CLONER, simply add a new snippet PHP and paste the code below (this is the same code as the previous one, but it contains the function add_action) :

add_action( 'wp_head', function () { ?>
<script>

	jQuery(document).ready(function($) {
    $("img").mouseenter(function() {
        let $ld_title = $(this).attr("title");
        $(this).attr("ld_title", $ld_title);
        $(this).attr("title", "");
    }).mouseleave(function() {
        let $ld_title = $(this).attr("ld_title");
        $(this).attr("title", $ld_title);
        $(this).removeAttr("ld_title");
    });
});

</script>
<?php } );

2 - Remove image title on mouse overfly without plugin

This is the fastest method. No need to install a new extension, Divi allows us to do this from its options.

image hover title sans plugin
Add a snippet to the Head section of the site
  1. Go to tab Divi > Theme Options > Integration
  2. In the box "Add line of code to the <head> of your blog », copy and paste the following code.
  3. Save your changes.

Here is the code to use:

<script>
jQuery(document).ready(function($) {
    $("img").mouseenter(function() {
        let $ld_title = $(this).attr("title");
        $(this).attr("ld_title", $ld_title);
        $(this).attr("title", "");
    }).mouseleave(function() {
        let $ld_title = $(this).attr("ld_title");
        $(this).attr("title", $ld_title);
        $(this).removeAttr("ld_title");
    });
});
</script>

The original code comes from the site LearnHowWP.

Now, you can check the images of your site: the title infobull no longer appears over the mouse.

Note: it's the same code used for the Snippet Code method, except that the Snippet code is embedded in the tags

3 – What is the best method?

How to add a stylish and inverted cursor to your Divi page

Certains utilisateurs n’aiment pas ajouter encore et toujours des plugins, ils opteront donc pour la méthode avec les options de Divi.

Toutefois, la méthode avec Code Snippets offre quelques avantages :

  • Si le code est défectueux pour X raisons (vous avez mal copié-collé, la source où vous avez trouvé votre snippet est obsolète, etc), vous pouvez facilement désactiver le snippet grâce à son Toggle bleu.
  • Si le code ajouté casse votre site, c’est beaucoup plus facile de désactiver temporairement un plugin via FTP plutôt que le Theme Divi.
  • Si vous débutez, c’est un bon moyen de vérifier si cela fonctionne avant d’embarquer votre snippet définitivement dans les options de Divi.
  • Cela permet de bien ranger vos snippets : si vous en avez beaucoup, cela peut être difficile de les identifier s’ils sont tous à la suite dans les options du thème (onglet Intégration).

Pour aller plus loin, voici quelques articles qui pourraient vous intéresser :

Need more resources on Divi? Visit ElegantThemes blog full of ideas and tutos! Or learn how to effectively use this theme through my training Divi !

supprimer titre image pin 2
supprimer titre image pin 1

Get Divi

Divi training

Ebook Divi PDF

Free tips

Divi Quiz

Live coaching

icon 256x256
Discover my wpLingua plugin that makes your WordPress websites multilingual ! SEO-Friendly / Automatic / Editable

12 Comments

  1. David C.
  2. Lycia Diaz
  3. Agathe Ogeron
  4. Lycia Diaz
  5. Gregoryen
  6. Guillerm Arthur
  7. Joyce
  8. Lycia Diaz
  9. Philippe K
  10. stephanie
  11. Lycia Diaz
  12. Lycia Diaz

Submit a comment

Your email address will not be published. Required fields are indicated with *

This site uses Akismet to reduce undesirables. Learn more about how your feedback data is used.