Skip Navigation

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.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 -

Supporter timezone: Asia/Singapore (GMT+08:00)

This topic contains 13 replies, has 0 voices.

Last updated by Kor 1 month, 4 weeks ago.

Assisted by: Kor.

Author Posts
January 27, 2025 at 7:51 pm #16639189

Kor
Supporter

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thanks for your reply.

I've checked and it looks like a known issue as explained here https://wpml.org/errata/elementor-pro-loop-grid-alternate-templates-non-dynamic-content-is-not-translated/ . Could you please try the workaround provided and see if it works?

February 4, 2025 at 8:05 pm #16668395

luukv-6

Hi Kor,

Thanks for investigating but this is not the same issue as I am facing. It looks similar but I don't use alternate templates.
See my screenshot attached.

In fact, even the (correct) ENG page now looks like it doesn't correctly load all translations. Please see the additional bug in the screenshots attached.

Could you possibly try any bugfixes yourself with the Duplicator package? This way the ticket doesn't take any more time. I am only available a few days a week but the client is really in need of a bugfix 🙂

iScreen Shoter - Brave Browser - 250204210329.jpg
iScreen Shoter - Brave Browser - 250204210353.jpg
February 5, 2025 at 7:33 pm #16672796

Kor
Supporter

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thanks for your reply.

I will have to escalate this further to our 2nd Tier Support for further assistance. I will come back to you once I've feedback.

February 6, 2025 at 7:30 pm #16677001

Kor
Supporter

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thanks for your patience. I apologize for the delays. I still need more time on this and I will come back to you as quicky as possible.

February 11, 2025 at 4:27 pm #16692921

Kor
Supporter

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thanks for your patience. Our 2nd Tier Support checked and applied the custom PHP cod below into your theme's functions.php file.

add_filter( 'elementor/frontend/before_render', 'wpml_compsupp6865_filter_loop_grid_widget');

function wpml_compsupp6865_filter_loop_grid_widget($element) {
	if ( 'loop-grid' !== $element->get_name() ) {
		return;
	}

	$settings = $element->get_settings();

	if ( isset( $settings['post_query_include_term_ids'] ) && is_array( $settings['post_query_include_term_ids'] ) ) {
		
		// Query by terms
		foreach ( $settings['post_query_include_term_ids'] as $key => $id ) {      

			
			$taxonomy = 'category';

			$term = get_term($term_id);			

			if ($term instanceof WP_Term) {
				$taxonomy = $term->taxonomy;
			} 

			$id = apply_filters( 'wpml_object_id', $id, $taxonomy, true );

			unset($settings['post_query_include_term_ids'][$key]);
			$settings['post_query_include_term_ids'][] = $id;

		}

		// Update the settings
		$element->set_settings( 'post_query_include_term_ids', $settings['post_query_include_term_ids'] );
	}
}

Now the translated FAQ section works correctly now hidden link . Could you backup and apply the same fix to your live site and let me know how it goes?

February 11, 2025 at 6:42 pm #16693291

luukv-6

Hey Kor,

Thanks for the follow-up and I can see they have added the code and can confirm that the code works.
So:
Elementor ENG edit -> WP admin translate -> Homepage NL still works. :):)

However..

IN the Elementor page builder from the translated page (NL):
When loading the loop templates it still looks like the WPML data isn't correctly loaded, and in fact, because of that the section is empty.
If I would save the page as is, the content will be lost.

hidden link

See screenshots attached.

I've read before that you said this is due to Elementor pagebuilder loading issues, but it looks like the filtered terms are javascript-base loaded so always should load the correct response.
Again, please verify my steps (Elementor ENG edit -> WP admin translate the page -> wait for the translation to complete -> load NL Elementor homepage -> see all filtered terms aren't correctly loaded)

iScreen Shoter - Brave Browser - 250211193434.jpg
February 12, 2025 at 9:15 am #16694868

Kor
Supporter

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thanks for your reply.

Sorry, I'm not getting this. I've checked the homepage here hidden link and the FAQ section is still loaded. Are you saying that it is not loaded with the correct terms?

One more thing, when you use the Advanced Translation Editor, it is not recommended that you edit the translated page using Elementor or Editor. If you need to change anything, just make the changes on the primary language page and update the translation to reflect the changes.

The topic ‘[Closed] FAQ loop template isn't correctly translated from ENG to NL’ is closed to new replies.