0

Ok, I know that posts can't be nested but for the purpose of this question, I'm using the word.

I'm having some trouble wrapping my head around creating a pedigree site, I'll explain where I am and where I'm stuck.

So far I just have the CPT and custom fields created with the ACF plugin.

I created a number of posts placed in taxonomies, see below;

  • Posts: Farther, Mother | Placed in tax Parents
  • Posts: Son, Daughter, Daughter | Placed in tax Children
  • Posts: Grandson, Granddaughter, Grandson, Granddaughter | Placed in tax Grandchildren
  • Posts: Great grandson, Great granddaughter, Great grandson, Great granddaughter, Great grandson, Great granddaughter | Placed in tax Great-grandchildren

So I need to create a relationship between these posts and output that relationship to an archive type page that I'll format in a tree view.

My question is how do you create that relationship and output it?

I hope I explained correctly, if clarification is needed please let me know.

  • You can do relationships with ACFs, have you looked at using these? – Aravona Sep 24 '18 at 8:16
  • You can do hierarchical post types, if that helps. But what are you trying to do, exactly? Your custom post type item Father could have a child post item daughter, and there would be a direct relationship w/o the need for any plugins. – Michael Sep 24 '18 at 8:31
  • Aravona I have looked at the ACF relationships yes. @Michael what I'm trying to figure out is I guess assigning the post, for example, I create a post that I place in Father I then create another post that goes into daughter how do I then assign that post to that particular Father post? Hell I hope I explained that one right :P – labworxsa Sep 24 '18 at 15:10
  • In this case I'm not sure why you mention your taxonomy, because it has nothing to do with creating this kind of relationship. As I said, you can use hierarchy or you could use ACF relationships, which does pretty much what you want, I suppose. – Michael Sep 24 '18 at 17:06
  • Ah ok, thanks very much @Michael, appreciate the input. – labworxsa Sep 24 '18 at 17:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.