<ul> <li> <div> <span class="female">UNKNOWN</span> <span class="spacer"></span> <span class="male">UNKNOWN</span> </div> <ul> <li> <div> <span class="male">Sam Snow 1631 - 1695</span> <span class="spacer"></span> <span class="female">Lily Sight 1633 - 1697</span> </div> <ul> <li> <div> <span class="male">Ralf Snow 1651 - </span> </div> </li> <li> <div> <span class="female">Brie Snow 1653 - </span> </div> </li> </ul> </li> <li> <div> <span class="male">Jim Snow 1633 - 1697</span> <span class="spacer"></span> <span class="female">Zoe Blue 1633 - 1697</span> </div> <ul> <li> <div> <span class="male">Ralf Snow 1651 - </span> <span class="spacer"></span> <span class="female">Sally Bern 1653 - </span> </div> <ul> <li><div><span class="female">Magna Snow 1679 - </span></div></li></ul></li><li><div><span class="female">Brie Snow 1653 - </span></div></li></ul></li><li><div><span class="male">John Snow 1635 - 1699</span></div></li></ul></li></ul>
This particular project will likely have to be completed in two portions, unless the developer believes that the project would be cheaper, or easier to complete in one session. As funding is an issue, the project may not commence immediately, or may need to be completed in several small chunks.
I just need the bi-directional relationships working correctly in the backend of the website. I do not need help displaying the relationships on the front-end.
There are a couple examples I have been able to find online of how bi-directional relationships could be accomplished:
My PHP skills are unfortunately not good enough to be able to translate these examples into my own setup within ACF Pro, as I cannot find any examples of bi-directional relationships which use repeaters.
Here is a link to the documentation of ACF. It appears that you'll need to hook into the acf/update_value filter in order to accomplish this.
All of the relevant fields are in one ACF field group: "People - Basic Information". Within that field group, there are three "groups":
In the "names" group, the only relevant field will be "gender", which should be used to determine whether a person is a "mother" or a "father" of a child.
In the "whp_parents" group, I have two fields:
The "spouses" repeater is where is gets a little confusing.