Support

Account

Home Forums General Issues Relationship field on translated pages Reply To: Relationship field on translated pages

  • I found a solution myself. I don’t know why it does the trick, but for other people facing the same problem, you need to set the ACF relationship field of the translated field group to return post ID’s instead of post objects, and then you can call them like:


    <?php

    $posts = get_field('relationship_field');

    if( $posts ): ?>

      <?php foreach( $posts as $post): // variable must be called $post (IMPORTANT) ?>
      <?php setup_postdata($post); ?>

    • "><?php the_title(); ?>
    • <?php endforeach; ?>

    <?php wp_reset_postdata(); // IMPORTANT - reset the $post object so the rest of the page works correctly ?>
    <?php endif; ?>

    And change relationship_field to the name of your relationship field.