Link to a page where the issue can be seen: hidden link
I expected to see: The page fully translated and the link to the tours also with the pt-pt slug
Instead, I got: Some translations are not showed and when I click on the links it jumps to the english version, loosing the pt-pt slug, but inside each of those links if I select the portuguese language all of them are translated and the slug is added.
Also if I change to the add language as a parameter instead of slug, it works and the links are loaded in the correct language.
I have reviewed the page and identified the issue. Upon inspecting the page, I discovered that the Tour section is added using a default Elementor widget provided by your theme (Triply). Please note that Triply is not listed in our compatible theme directory, so the issue could be due to a compatibility problem. You can verify the theme's compatibility at this link: https://wpml.org/theme/
Typically, for Custom Elementor Widgets, the "suppress_filters" argument should be set in the widget's query. This helps in filtering and displaying content specific to each language correctly. Please review the widget code to ensure that this argument is correctly applied.
Additionally, it would be beneficial to contact the theme author or their support team to verify that the widget is properly configured to display language-specific content. Since the theme is not listed in our compatible theme directory, you could also request them to join the Go-global program of WPML. This would help ensure better compatibility and support for multilingual sites. For more information about the program, please check this link: https://wpml.org/documentation/support/go-global-program/
I hope you can understand. Please feel free to let me know if you need further assistance or clarification in this matter. I will be happy to help.
From the Screenshot, I noticed that the `suppress_filters` argument is used in the `get_terms`. The `suppress_filters` is not a valid argument for get_terms. It is typically used in WP_Query to suppress filters like pre_get_posts. For taxonomy queries with get_terms, you might need a different approach to achieve your goal. The `wpml_object_id` or `wpml_current_language` could help in displaying the term in each language.
So, please locate where the query is happening in the widget code and place the argument there. For example, please check the code below:
// WP_Query arguments
$args = array(
'post_type' => $settings['post_type'],
'posts_per_page' => $settings['number_of_posts'],
'suppress_filters' => false, // Ensures filters are applied
);
// The Query
$query = new WP_Query( $args );
It would also be beneficial to reach out to the theme support and consult with them regarding this issue. They might be able to provide better suggestions and solutions.
If there is anything else you need help with, let me know. I will be happy to help.
Best regards,
Prosenjit
The topic ‘[Closed] Some page dont load some trranslations and also the link with the same lang slug’ is closed to new replies.