Hi,
With the help of forums, videos etc I have been trying to implement this for countless hours, but I seem to be missing something fundamental. I am really hoping for your help.
I have two CPT, Translators and Translations. The Translations have taxonomies for different languages. The Translations have a Repeater field where I access the Translator with a Post-Object field, among other things. The repeater field is because a translation can have several languages.
I have managed (with your help, among other things) to make a list of the translations with the corresponding translators and this works fine.
Now I have to do this the other way round, i.e. a list of translators with the corresponding translations that this translator has made.
I have tried countless variations, most recently with a meta_query and
<?php
$args = [
'post_type' => 'translation',
'meta_query' => array(
array(
'key' => 'translator_name',
'value' => get_the_ID(),
'compare' => '='
)
)
];
$translations_by_translators = get_posts( $args );
?>
The translator_name field is currently set to return a post object, but it didn’t make any difference whether it was a post ID or post object.
I am aware that I am probably making it too simple with the code above and that the solution looks a bit more complex.
Thank you very much for your help!
Adriano