Support

Account

Home Forums General Issues Loop through post for a "family tree"? Reply To: Loop through post for a "family tree"?

  • You need to have bidirectional relationship fields (there are plugins that will do this) or use a reverse relationship query.

    The code involve would be quite complex. You would need to create some type of a recursive function to go both up and down the relationships and build arrays with nested arrays holding all of the data and/or display that data. You’d probably also need to use an output buffer, or potentially several output buffers, to build the content.

    I can’t give you any example code because it would take many hours to come up with something and I don’t know of any examples of doing something like this.