Skip to content Skip to sidebar

This thread is resolved. Here is a description of the problem and solution.

Problem:
If you're experiencing issues where translations are not displaying correctly on your website's front end, even though they appear to be added correctly, we can help you address this.
Solution:
1) We recommend updating your theme and Elementor plugins to their latest versions to see if that resolves the problem. Always ensure to create a backup before proceeding with updates.
2) If updating does not resolve the issue, consider creating a staging site for further investigation. If creating a staging site isn't feasible, we can assist by making a copy of your site using the Duplicator plugin, but we will need your permission to proceed.
3) As a temporary workaround, you can adjust the code in your site. Specifically, add extra conditions in

\WPML\PB\Elementor\Hooks\QueryFilter::recursivelyTranslateQueryIds

in

/wp-content/plugins/sitepress-multilingual-cms/addons/wpml-page-builders/classes/Integrations/Elementor/Hooks/QueryFilter.php

. Here is the code snippet you can use:

if ( ! empty( $data->settings->query_include_term_ids ) ) {
	$data->settings->query_include_term_ids = $this->convertTermTaxonomyIds( $data->settings->post_query_include_term_ids );
}
if ( ! empty( $data->settings->query_exclude_term_ids ) ) {
	$data->settings->query_exclude_term_ids = $this->convertTermTaxonomyIds( $data->settings->post_query_exclude_term_ids );
}
if ( ! empty( $data->settings->post_query_posts_ids ) ) {
	$data->settings->post_query_posts_ids = Ids::convert( $data->settings->post_query_posts_ids, Ids::ANY_POST );
}
// --- New cases ---
if ( ! empty( $data->settings->query_include_term_ids ) ) {
	$data->settings->query_include_term_ids = $this->convertTermTaxonomyIds( $data->settings->query_include_term_ids );
}
if ( ! empty( $data->settings->query_exclude_term_ids ) ) {
	$data->settings->query_exclude_term_ids = $this->convertTermTaxonomyIds( $data->settings->query_exclude_term_ids );
}
if ( ! empty( $data->settings->query_posts_ids ) ) {
	$data->settings->query_posts_ids = Ids::convert( $data->settings->query_posts_ids, Ids::ANY_POST );
}

If these steps do not resolve your issue or if the solution seems outdated or irrelevant to your case, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If needed, please do not hesitate to open a new support ticket for further assistance.

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

Tagged: 

This topic contains 15 replies, has 0 voices.

Last updated by Dražen 4 months, 2 weeks ago.

Assisted by: Dražen.

Author Posts
December 11, 2025 at 7:17 am #17654453

Dražen
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hello,

thanks for waiting.

Our 2nd tier have checked, confirmed the bug and escalated further to developers.

In the meantime, you can adjust the code and use this fix as a workaround. If you need help, let me know, and I can apply the fix to your live website.

Workaround
Add extra conditions in \WPML\PB\Elementor\Hooks\QueryFilter::recursivelyTranslateQueryIds in /wp-content/plugins/sitepress-multilingual-cms/addons/wpml-page-builders/classes/Integrations/Elementor/Hooks/QueryFilter.php

			if ( ! empty( $data->settings->query_include_term_ids ) ) {
				$data->settings->query_include_term_ids = $this->convertTermTaxonomyIds( $data->settings->post_query_include_term_ids );
			}
			if ( ! empty( $data->settings->query_exclude_term_ids ) ) {
				$data->settings->query_exclude_term_ids = $this->convertTermTaxonomyIds( $data->settings->post_query_exclude_term_ids );
			}
			if ( ! empty( $data->settings->post_query_posts_ids ) ) {
				$data->settings->post_query_posts_ids = Ids::convert( $data->settings->post_query_posts_ids, Ids::ANY_POST );
			}
      // --- New cases ---
			if ( ! empty( $data->settings->query_include_term_ids ) ) {
				$data->settings->query_include_term_ids = $this->convertTermTaxonomyIds( $data->settings->query_include_term_ids );
			}
			if ( ! empty( $data->settings->query_exclude_term_ids ) ) {
				$data->settings->query_exclude_term_ids = $this->convertTermTaxonomyIds( $data->settings->query_exclude_term_ids );
			}
			if ( ! empty( $data->settings->query_posts_ids ) ) {
				$data->settings->query_posts_ids = Ids::convert( $data->settings->query_posts_ids, Ids::ANY_POST );
			}

Regards,
Drazen