Answers for "wpml get translated post"

PHP
1

wpml get translated post id

// WPML get Post on translated Language
// The only parameter you have to use is -> $postIdToTranslate
$translatedPostId = icl_object_id($postIdToTranslate, 'page', false, ICL_LANGUAGE_CODE);
$myPost = get_post( $translatedPostId );
Posted by: Guest on June-01-2020

Browse Popular Code Answers by Language