Home › Forums › General Issues › Bidirectional relationship › Reply To: Bidirectional relationship
I fixed the syntax error.
Yes, you should edit it to change the field keys to match the field keys of the relationship fields you want to make 2 directional. If it’s the same field then put the same field key in both places, but remove the second add_filter()
line.
The file I put on github is meant to be an example and there’s a lot of comments in it to explain what’s going on. I use the repo to post many examples of code for doing things in ACF.
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.