Home › Forums › ACF PRO › Bidirectional Relationships require both posts to be manually updated › Reply To: Bidirectional Relationships require both posts to be manually updated
That code is mine.
Also this is mine and works where the field names are the same and it deals with the keys. https://wordpress.org/plugins/post-2-post-for-acf/. The reason that it works is that it basically reads thought all of the ACF fields to find all the fields with the same name and then uses the key…. well, it actually uses update_post_meta() and bypasses the acf function completely. It also has some other features like checking the max number of posts that the field on the other side of the relationship can have so it won’t have too many.
The basic code will work where you use the same field, basically a field group with one field for the relationship where you have the group on multiple post types. It’s really designed for the same field in the same field group.
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!