Support

Account

Forum Replies Created

  • 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.

  • This reply has been marked as private.
  • This reply has been marked as private.
  • This reply has been marked as private.
  • Thanks for your reply Elliot.

    I understands how it works, but for my websites that use the free ACF version it really duplicated the field group, and the duplicated fields and their fieldkeys remained identical to the original.

    The problem that I have now is that I have to update each individual post after I have duplicated them. All my translated posts are duplicates of the original, and for the duplicated I have only translated the select fields labels in the field groups and the hard coded text in the PHP. So I don’t need them to save any new data. I want them to be connected – when I update the default language post, I want the duplicated posts to also be automatically updated and overwritten too.

    But now when the fieldkeys don’t match the original, I have to manually update the posts after duplication – otherwise the default language labels are shown, rather than my translated labels. And I have thousands of posts, so that is inconvenient.

    So in other words, is it possible to give ACF pro, the same duplication process of Fields groups like in the free version? Where the field group is an actual duplicate, and not a translation.

  • I am experiencing the same issue, even though I have the above WPML / ACF settings set up correctly.

    The issue is rather straightforward.

    After creating a field group in the default language, duplicating the field group does not work. The ticked duplicate box remains empty, and when going back to the field groups overview you see that it did create a translation, instead of a duplicate.

    The end result of this is that for each field new fieldkeys are created for the translation. For my websites I need to have identical fieldkeys for my fieflds for all languages.

Viewing 6 posts - 1 through 6 (of 6 total)