Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1354958

    Dear Team,
    Can you please tell me how can I remove the names of the images of the website appearing when hovering with the mouse ?
    Thank you and regards,
    Natacha

    #1355003

    Hey HulaSlim,
    Thanks for your question I assume that your are referring to the “title” attribute for the images
    Try adding this code to the end of your child theme functions.php file in Appearance ▸ Editor:

    function custom_remove_title_script() { ?>
      <script>
    (function($){
      $("*").hover(function(){
        $(this).removeAttr("title");
      });  
    })(jQuery);
    </script>
      <?php
    }
    add_action('wp_footer', 'custom_remove_title_script');

    Best regards,
    Mike

    #1355179
    This reply has been marked as private.
    #1355180

    Hi,

    You should add the code Mike shared into Functions.php file of your child theme and not Style.css file.
    Please add it to the correct file and it should work :)

    Regards,
    Yigit

    #1355267

    Hi Yigit,
    Sorry to contradict you, but in appearence / editor, I only have one window whose title is “Enfold Child: style.css”.
    Can you please check in my WP ?
    Thank you
    Regards,
    HulaSlim

    #1355273

    Hi,
    On the page Modifier les thèmes under Fichiers du thème please click on the title functions.php
    2022-06-14_005.jpg
    I added the script for you, please check.
    If you find a page that is still showing the mouse-over image titles, please link to it so we can examine and adjust the script.

    Best regards,
    Mike

    #1355339

    Dear Mike,
    I’m so sorry I couldn’t see that link. I didn’t know it was on the right side.
    But I cheked all the images, and not a single one still shows the title when hovering.
    Thank you so much for your help,
    Kind regards,
    HulaSlim

    #1355341

    Hi,
    Glad we were able to help, if you have any further questions please create a new thread and we will gladly try to help you. Thank you for using Enfold.

    Best regards,
    Mike

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘Image names appearing on hover’ is closed to new replies.