
If meticulously crafting titles for your WordPress media images has been your modus operandi, you’ve likely encountered the dilemma of wanting to disable these titles when hovering over images on your website’s front-end. Manually removing titles from each image can be not only time-consuming but also prone to errors.
To streamline this process and remove titles from all media images in one fell swoop, you have a couple of effective solutions at your disposal:
1. Using PHP in functions.php:
Within the functions.php file of your WordPress Child theme, you can add the following code snippet:
This PHP function targets all content on your website and removes the title attribute from images, effectively disabling hover titles.
2. Using JavaScript:
Alternatively, you can utilize JavaScript to achieve the same outcome. Insert the following code snippet just before the closing </head> tag in your website’s HTML:
This script, executed when the page loads, removes the title attribute from all image elements, eliminating hover titles across your website.
For Avada theme users seeking a simpler solution, the process can be streamlined by leveraging the Theme Options panel:
– Navigate to Options -> Advanced -> Code Fields -> Space Before Head section.
– Paste the JavaScript code snippet provided above into the designated area.
By implementing either of these methods, you can swiftly remove titles from all media images across your WordPress website, enhancing user experience and streamlining website maintenance. With this efficient approach, you’ll save valuable time and effort, allowing you to focus on more important aspects of managing your website.