Using polylang, how can I see which post is the “original” and which are the “translated children”? [closed]

polylang stores translation in a taxinomy but it’s better to access them with the polylang object like that :

// test if the plugin polylang is present
if (isset($GLOBALS["polylang"])) {

    $translations = $GLOBALS["polylang"]->model->post->get_translations($post->ID);

    // $translations contains an array with all translations of the post

}

all translations are interconnected then there is no parent translation. if you want to find the first created post you can search the lowest ID or sort by publication time.

tech