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