Err… I think I see something regarding the “Querying Relationship Fields” doc…
If you have to query using
get_field() on one end but
get_posts() on the other, I’m not sure that’s *real* bidirectionality.
Per the doc…
“Related Viewpoints”, set on an Article post:
set 3 x ‘Viewpoint’ posts:
$related_viewpoints = get_field('related_viewpoints');
“Related Articles”, set on a Viewpoint post:
the Article on which I set the Viewpoint post is not seen on the Viewpoint edit:
have to return it/them with
So, there doesn’t seem like real bidirectionality here. To truly link them, you’d have to manually add the equivalent linked posts on each side.
Could this be because I used a different field name on each side?
related_viewpoints. I don’t think so.
– It looks like the doc on Bidirectional Relationships would implement this.
– And @hube2‘s plugin is a variant of that.
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!
© 2022 Advanced Custom Fields.