Fixing Ultimate Addons for Elementor Search Issues with Multilingual Sites (Polylang & WPML)
Content
Many users of the Ultimate Addons for Elementor (UAE) plugin run into a common challenge when building multilingual websites: the Search widget doesn't always play nicely with popular translation plugins like Polylang or WPML. This article explains the core issue and provides the most common workarounds and solutions based on community experience.
The Core Problem: Language Parameters in Search URLs
The primary issue, as reported by numerous users, is that the UAE Search widget often fails to append the necessary language code (like /es or /de) to the generated search URL. When a visitor uses the search on a translated page (e.g., the Spanish version of a site), the search results page loads without the language parameter. This causes the results to default to the site's primary language, showing irrelevant or no results for the user.
Why This Happens
This behavior typically occurs because the search form's action URL is not being dynamically filtered by the multilingual plugin. While native Elementor widgets or themes might be compatible with translation plugins' hooks, some third-party widgets may not include this integration by default, leading to a static URL that doesn't change based on the current language.
Common Solutions and Workarounds
1. Use a Custom JavaScript Snippet
This is a widely used community fix. The idea is to use a small script that detects the current language and then modifies the search form's action URL to include the correct language code before the form is submitted.
Example Concept (Polylang):
A user in the sample threads mentioned fixing the issue by "checking the 'lang' attribute and adding the country code." The exact code would vary based on your site's structure, but it often involves using JavaScript to find the search form and prepend the language slug to its action attribute.
Important Note: This requires custom coding knowledge. Always add such code using a dedicated plugin for custom code snippets and test it on a staging site first.
2. Consider Using WPML for Translation
Based on the sample threads, the Ultimate Addons for Elementor team has indicated better compatibility with the WPML plugin. Their documentation includes a guide on how to translate UAE widgets with WPML. If you are early in your project or considering switching translation plugins, WPML might offer a more seamless experience for translating the header and its contained widgets.
3. Use the Native Elementor Search Widget
As one user noted, "The native Elementor search works just like a charm." If the advanced styling of the UAE Search widget is not a strict requirement for your project, a simple and effective solution is to replace it with Elementor's core Search Form widget, which often handles multilingual parameters correctly.
4. Implement a Full-Screen Search Alternative
Another user mentioned resolving their layout and language issues by using "other plugin to open the search in full screen." If the problem is related to both functionality and RTL/LTR styling (as seen in one thread), using a third-party search plugin that is known to be fully multilingual-compatible could be a viable alternative to using the built-in UAE widget.
Next Steps
If you continue to experience issues, the best course of action is to provide very clear replication steps. As seen in the support threads, clearly explaining how to reproduce the issue on a fresh installation is the key to getting helpful advice from any community or support forum. Detail your WordPress, Elementor, UAE, and multilingual plugin versions, and describe the exact steps you take that lead to the broken search results.
Related Support Threads Support
-
Search results pagehttps://wordpress.org/support/topic/search-results-page-33/
-
Search element Polylang supporthttps://wordpress.org/support/topic/search-element-polylang-support/
-
Using search in icon layouthttps://wordpress.org/support/topic/using-search-in-icon-layout/
-
Search icon in different languageshttps://wordpress.org/support/topic/search-icon-in-different-languages/
-
Search and polylanghttps://wordpress.org/support/topic/search-and-polylang/
-
I can’t set the 2-language link of the logohttps://wordpress.org/support/topic/i-cant-set-the-2-language-link-of-the-logo/