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.

This topic contains 0 replies, has 1 voice.

Last updated by kristinN-4 4 weeks, 1 day ago.

Author Posts
May 15, 2025 at 6:05 pm #17038363

kristinN-4

Background of the issue:
I am trying to use an ACF Gutenberg Block to show Post Object fields on the Advanced Translation Editor. I wanted the post object to load the already translated version of the custom post type (CPT) post I picked on the English version.

Symptoms:
The Group - Quote field (Post Object) does not show on the Advanced Translation Editor.

Questions:
Why is the Group - Quote field (Post Object) not showing on the Advanced Translation Editor?
How can I ensure the post object loads the translated version of the CPT post?

May 16, 2025 at 8:28 am #17040093

kristinN-4

For anyone that might have the same problem, the code bellow just gives you the right post id based on the language.

$selectedQuote = get_field('post_object_field_here);
if ($selectedQuote) {
$translated_post_id = apply_filters( 'wpml_object_id', $selectedQuote, 'post', false, ICL_LANGUAGE_CODE );
}