Support

Account

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

  • Hi @markkro

    Did you add the code outside of The Loop? If you did, you need to pass the post/page ID as the second parameter to the get_field() function like this:

    get_field(‘previous_relationships’, 99)

    Where “99” is the translated post/page ID where the custom field is assigned. This page should give you more idea about it: https://www.advancedcustomfields.com/resources/get_field/.

    Could you also try to debug it like this:

    ehco "<pre>";
    var_dump( get_field('previous_relationships', false, false) );
    ehco "</pre>";

    Also, could you please share the template file of the page so I can check it out?

    If you could share the JSON or XML export file of the field group for both of the languages, that would be great too!

    Thanks 🙂