This topic has 27 replies, 4 voices, and was last updated 8 years, 3 months ago ago by Jack Richardson
Hello,
I’ve noticed that the hover effect images (Swap) dont’t have alt tags, although I have given alt tags to every image in my media library. It seems that the theme ignores these and thats a problem if I want to share one of these hover images via Pinterest. Because if there is no alt tag, Pinterest grabs the Yoast Seo Title of the current post or if there is no Yoast Seo installed, it grabs the image title tag of the current post. but not the image title tag that was given to the shared image itself.
I will give you some more details to check live this in Private Content.
Could you please help me and tell me how to add the image alt tags to the Hover Images?
Many thanks in advance!
Hello,
We’ll fix this issue in the next theme update.
Please take our apologies for inconveniences.
Regards,
Eva Kemp.
Ok, so it will definetly be fixed in the next update? Can you already estimate when the update will be out?
Thank you.
Hello,
We’ll pass this issue to our developers and they will include the fix in the theme update.
A new version should be released approximately in a week or earlier.
Regards,
Eva Kemp.
Ok great, looking forward for it. Thank you!
Hello,
You’re welcome.
Regards,
Eva Kemp.
Yes, I Found the same, Alt tags appear to be missing for all product images.
Hello @jaarsmacommunicatie,
This bug will be fixed in the next theme update.
Please take our apologies.
Regards,
Eva Kemp.
Hello,
as there hasnt been an update to fix this yet, I wanted to ask when it will be out?
Thank you.
Hello @Royalty,
Our developers are working on the theme improvement and it should be released in short time.
We appreciate your patience and understanding.
Thank you.
Regards,
Eva Kemp.
Thank you for fixing this. But instead of the product title, I would like to show the image alt tag. How do I have to edit the code to achieve this?
Many thanks in advance!
Hello,
You need edit the file wp-content/themes/royal/woocommerce/content-product.php in line 79 and change the code <img src="<?php echo $hoverImg['url']; ?>" alt="<?php the_title(); ?>" class="show-image">
to this one <img src="<?php echo $hoverImg['url']; ?>" alt="<?php alt_text(); ?>" class="show-image">
Regards,
Eva Kemp.
Thank you. But for my needs, I need to edit wp-content/themes/royal/woocommerce/content-product-slider.php on line 90 too. But when I insert the provided code, it breaks the layout. Any suggestions?
Many thanks in advance!
Hello @Royalty,
Please provide us with FTP and wp-admin panel credentials in Private Content.
Regards,
Eva Kemp.
Isnt it possible to help me without giving out my credentials?
I tried to replace <img src="<?php echo $hoverImg['url']; ?>" alt="<?php the_title(); ?>" class="show-image">
on line 90 of content-product-slider with <img src="<?php echo $hoverImg['url']; ?>" alt="<?php alt_text(); ?>" class="show-image">
but this breaks the layout. Any help how to edit the code would be really appreciated.
Many thanks in advance.
Update: Dont know why but now it works. But its still showing the product title instead of the image alt tag. I’ve made the changes in content-product.php and in content-slider.php. Is there any part of the code that I have missed to edit?
Sorry, I wanted to edit my last post but it always says “You cannot reply to this topic.”. My last post was wrong. The provided code still breaks the layout in content-slider.php.
Hello,
Please provide us with FTP (FTP host, FTP user, FTP password) credentials in private content.
Best regards,
Jack Richardson.
Hello,
please find temporary ftp credentials in private content. Please note that you have to make changes in themes/royalchildtheme/woocommerce because I have copied the edited woocommerce files into my childtheme folder.
Many thanks in advance!
Hello,
Alternative text (alt tag) is only meant to be shown when the image cannot be displayed and title text is for tooltip. Set image title the same as alt text.
Best regards,
Jack Richardson.
The issue related to '‘Missing alt tag on Swap Images’' has been successfully resolved, and the topic is now closed for further responses