Home › Forums › Backend Issues (wp-admin) › "Events" object – taxonomy or post? › Reply To: "Events" object – taxonomy or post?
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:
loop through $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 get_posts()
:
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_articles
and 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!
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.