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 🙂
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.