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.

Elementor users - please update WPML to the latest version to maintain compatibility. More details here - https://wpml.org/changelog/2024/12/wpml-4-6-15-critical-update-for-elementor-sites/
Sun Mon Tue Wed Thu Fri Sat
- - 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00
- - - - - - -

Supporter timezone: America/Lima (GMT-05:00)

This topic contains 5 replies, has 0 voices.

Last updated by Andreas W. 4 days, 4 hours ago.

Assisted by: Andreas W..

Author Posts
December 28, 2024 at 3:33 pm #16550204

mauroM-36

Background of the issue:
I’m experiencing an issue configuring WPML to handle the custom field uagb_featured_image_src, which is generated by the Ultimate Addons for Gutenberg (UAGB) plugin (now spectra to store featured_images). I want this field to be set as copied (automatically copied without translation) in translations, but despite my efforts, it doesn’t seem to work as expected. I attempted to configure the field using the wpml-config.xml file with the following syntax: uagb_featured_image_src However, the field is not being automatically copied into translations. I verified that the uagb_featured_image_src field is visible in the JSON response from the WordPress REST API, where it appears in this format: "uagb_featured_image_src": { "full": ["hidden link", 1100, 1584, false], "thumbnail": ["hidden link", 150, 150, true] } The field does not appear in the Custom Fields Translation section under WPML > Settings. I have cleared WPML’s cache and used the troubleshooting tools, but the issue persists. The field is part of a Custom Post Type (artist), which is registered with the show_in_rest option enabled. I’m using the latest versions of WPML and UAGB. My goal is to ensure that the uagb_featured_image_src field is automatically copied (action “copy”) in all translations.

Symptoms:
The uagb_featured_image_src field is not being automatically copied into translations and does not appear in the Custom Fields Translation section under WPML > Settings.

Questions:
Could you help me configure WPML to handle this custom field correctly?

December 28, 2024 at 3:44 pm #16550252

Andreas W.
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Hello,

Thank you for reaching out and the provided details.

You are creating a config for a Custom Gutenberg Block and not a Custom Field:
https://wpml.org/documentation/support/language-configuration-files/make-custom-gutenberg-blocks-translatable/

Such config will enforce strings from blocks to show up on the WPML Translation Editor.

There is sadly not "Copy" or "Copy once" option in such cases.

Best regards
Andreas

December 28, 2024 at 3:52 pm #16550256

mauroM-36

Mhm. I see. The problem being that that field seems to be mapped to the featured_image standard field. And I disabled the media translation. So, the only solution is to add the featured image twice for each post and for its translation?

December 28, 2024 at 4:42 pm #16550289

Andreas W.
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Hello,

The default WordPress Featured Image for posts will be synced based on the settings at WPML > Settings > Media Translation.

I suppose you are actually referring to a block from UAGB that displays the Featired Image on a Post Template - is this correct?

Best regards
Andreas

December 28, 2024 at 5:11 pm #16550322

mauroM-36

No.
I am building a custom toolset view and I need to access the featured image.
The problem being that I disabled the translation of media. Therefore I'd just need to be sure that in the copy of the custom post the featured image is copied or left untranslated.

December 29, 2024 at 2:19 am #16550619

Andreas W.
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

I am sorry, but you mentioned uagb_featured_image_src, which is a function used by the Ultimate Addons for Gutenberg (UAGB) plugin.

This is not a field and this is why you can not set it to copy.

The function generally has the following signature:

uagb_featured_image_src( $post_id, $size );

Each image in each language has a different ID.

You would need to use the following hook and filter the post ID per language before calling the function:
https://wpml.org/wpml-hook/wpml_object_id/