Hi,
I have a CPT "object" created with Types and translated with WPML.
I need to collect 3 languages on a feed we created, and I use this code:
$id = get_the_id();
$id_en = apply_filters( 'wpml_object_id', $id, 'object', false, 'en' );
$id_es = apply_filters( 'wpml_object_id', $id, 'object', false, 'es' );
$post_de = get_post($id);
$post_en = get_post($id_en);
$post_es = get_post($id_es);
$title_de = $post_de->post_title;
$title_en = $post_en->post_title;
$title_es = $post_es->post_title;
$description_de = $post_de->post_content;
$description_en = $post_en->post_content;
$description_es = $post_es->post_content;
But somehow the variable $id_en and $id_es do not deliver the post ids of the translated posts.
Do I miss something?
Thanks
My issue is resolved now. Thank you!