Problem:
The customer is using the WPML plugin to translate their website and encountering two major issues:
1- Images are not being displayed on some pages.
2- URLs are automatically adding a "." at the end, leading to 404 errors.
Solution:
1- URL Issue:
I identified and removed the extra character causing the URL issue by editing the view translation.
This resolved the broken links.
2- Image Display Issue:
The issue was caused by malformed HTML, specifically the custom HTML used to insert left and right arrow buttons in the sliders.
The Advanced Translation Editor was encoding the HTML tags, breaking the display.
Two possible workarounds were suggested: using actual Toolset components or registering the arrows as shortcodes.
I implemented the second workaround with the help of our 2nd tier support:
- Added a shortcode to functions.php to register the custom widget:
- Registered the glide_arrows shortcode in Toolset settings.
- Edited the template containing the sliders and replaced the div with the arrow buttons with the [glide_arrows] shortcode.
This resolved the issue with the images.
I am trying to replace the 'Add to cart' text with an image or an icon but can't figure out how to do it using the shortcode variations.
Solution:
It is not possible to add an icon or text directly inside the add_to_cart_text attribute. Instead, use custom CSS to add it as a background image. Provide the URL where the shortcode is used and the URL of the image for further assistance in creating a CSS starting point.