Replacing the "title" attribute on homepage images to show the "alt" text

Posted in: Newspaper
Post count: 3

Hi ๐Ÿ™‚
On the homepage when you hover over one of the images the title of the post is displayed like this: https://imgur.com/a/MX3k3MH

My client would prefer it to show the alt tag of the image. How can I change this? I’ve got a child theme setup and had edited the file includes/wp_booster/td_module_single_base.php but it doesn’t seem to have done anything. The title is still displaying.

Code: https://imgur.com/a/OPQbOfv

Any thoughts? Thanks in advance ๐Ÿ™‚

Post count: 35449

Hi,

Unfortunately our theme do not have any option for this and in order to achieve that you’ll need to edit the td_module.php file and make the thumb to get the text set alt area of feature image -> https://www.screencast.com/t/AG0v6rKAI -> https://www.screencast.com/t/N7isr1opb
Here is the path D:\XAMPP\htdocs\test_site\wp-content\themes\Newspaper\includes\wp_booster\td_module.php
-> https://www.screencast.com/t/m0ghFAXDXg
-> https://www.screencast.com/t/vmeCpwT6W
-> https://www.screencast.com/t/EjqEo7M2b4U

Also you’ll need to make some change on line 314 too -> https://www.screencast.com/t/F1qmYLn6G -> https://www.screencast.com/t/hXw3pcvzM -> https://www.screencast.com/t/dAHXWvwJj -> https://www.screencast.com/t/5ufILEJgQ41

Please make this changes in a child theme.

Hope this will help you!
Thanks.

Post count: 3

Thanks for your help ๐Ÿ™‚

I’ve changed the code in includes/wp_booster/td_module.php in a child theme but this doesn’t seem to have done anything on the homepage -> https://www.enterprisetimes.co.uk

It’s still showing the title attribute and it hasn’t replaced with the alt tag.

Any thoughts?
Thanks ๐Ÿ™‚

Post count: 35449

Please make this change in theme files with child them deactivate, and after you achieve the result try to set the settings in child theme.

Thanks.

Post count: 3

Thanks – this worked using the theme files ๐Ÿ™‚

Why weren’t they picked up from my child theme?

Is Newspaper-child/includes/wp_booster/td_module.php the correct path?

Post count: 35449

Hi,

I make some investigation and investigation and is look like this file ( td_module.php ) can not be set in child theme, sorry for the inconvenience!
You can see our documentation for child theme here -> https://forum.tagdiv.com/the-child-theme-support-tutorial/

Thank you for your understanding!

Viewing 6 posts - 1 through 6 (of 6 total)
The forum ‘Newspaper’ is closed to new topics and replies.