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 changes in the image order in a property's media gallery are not synchronizing across translations in different languages, this might be due to a compatibility issue between WPML and the Houzez theme.
Solution:
We recommend taking the following steps to address this issue:
1. Ensure you have a full backup of your site before proceeding.
2. Add the following code to your theme’s functions.php file:

// WPML - Workaround for compsupp-8361
add_action( 'save_post_property', function( $post_id ) {

// check if the property has translations
$trid = apply_filters( 'wpml_element_trid', null, $post_id, 'post_property' );
if ( ! $trid ) {
return;
}

// Get the translations
$translations = apply_filters( 'wpml_get_element_translations', null, $trid, 'post_property' );
// Get the gallery images
$fave_prop_images = get_post_meta( $post_id, 'fave_property_images', false );

foreach ( (array) $translations as $lang => $translation ) {
// delete the gallery
delete_post_meta( $translation->element_id, 'fave_property_images' );

foreach ( $fave_prop_images as $image_id ) {
// translate the image if needed
$image_id = apply_filters( 'wpml_object_id', $image_id, 'attachment', true, $lang );
// Re-add the image to the gallery
add_post_meta( $translation->element_id, 'fave_property_images', $image_id );
}
}
}, 1000 );

3. Update the properties once to reflect the changes.

Please note that this solution might become outdated or may not apply to your specific case. If this solution does not resolve your issue, 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 further assistance is needed, please open a new support ticket at WPML support forum.

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 19 replies, has 0 voices.

Last updated by Shekhar Bhandari 1 week, 1 day ago.

Assisted by: Shekhar Bhandari.

Author Posts
May 7, 2026 at 9:45 am #18019840

christinaM-14

Hello,

The reason you cannot see the image section is that I deactivated the purchase code after performing the test to ensure my license remains secure.
Tell me when you want me to activate it

May 7, 2026 at 9:51 am #18019875

Shekhar Bhandari
WPML Supporter since 03/2015

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello

Can you please enable it so our compatibility team can check this further, I suggest you to keep it enabled until we fix the issue.

Thanks

May 7, 2026 at 10:03 am #18019892

christinaM-14

Hello,

I have enabled the purchase key on the sandbox. Please proceed with your compatibility tests.

Thank you!

May 7, 2026 at 10:21 pm #18021460
christinaM-14

Also, what happened today:
After saving something in Houzez Theme Options, all the Greek translations in Theme Options → Translation reverted back to English (the theme's built-in default language). This has now happened multiple times and I have been forced to restore my entire site from an UpdraftPlus backup each time to recover.

I also tried the code snippet that was suggested (wpml_st_get_string_id filter) but it did not help. (errata)

This is causing serious disruption. Every time I need to change any setting in Theme Options, I risk losing all my translations.

Could you please escalate this and provide a permanent fix? The errata article clearly has not resolved the issue for WPML 4.9.2.1 + latest Houzez.

Given that this is a compatibility issue between WPML and Houzez, I would kindly ask if WPML support could contact Favethemes/Houzez directly to resolve this at the source. This affects many users with non-English default languages and needs a coordinated fix between both teams.

thank you.

New threads created by Shekhar Bhandari and linked to this one are listed below:

https://wpml.org/forums/topic/houzez-theme-options-reverted-back-to-english/

May 8, 2026 at 4:20 am #18021574

Shekhar Bhandari
WPML Supporter since 03/2015

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

I have created a separate ticket for the theme options issues, regarding the gallery synchronization issue, our compatibility checked the issue and suggested the following workarround.

- Please, make sure of having a full site backup of your site before proceeding.

- Add the following code to your theme’s functions.php file.

// WPML - Workaround for compsupp-8361
add_action( 'save_post_property', function( $post_id ) {

	// check if the property has translations
	$trid = apply_filters( 'wpml_element_trid', null, $post_id, 'post_property' );
	if ( ! $trid ) {
		return;
	}

	// Get the translations
	$translations = apply_filters( 'wpml_get_element_translations', null, $trid, 'post_property' );
	// Get the gallery images
	$fave_prop_images = get_post_meta( $post_id, 'fave_property_images', false );

	foreach ( (array) $translations as $lang => $translation ) {
		// delete the gallery
		delete_post_meta( $translation->element_id, 'fave_property_images' );

		foreach ( $fave_prop_images as $image_id ) {
			// translate the image if needed
			$image_id = apply_filters( 'wpml_object_id', $image_id, 'attachment', true, $lang );
			// Re-add the image to the gallery
			add_post_meta( $translation->element_id, 'fave_property_images', $image_id );
		}
	}
}, 1000 );

- Update the properties once.

Let me know if this helps.

Thanks