Here's my situation....

I'm creating a plugin that will allow families to register on the site I'm working on. Each family will have 1 or more children that they need to add to their registration. My initial thought was to make 2 custom post types - Family and Child and relate them either through metadata or through a custom table (1 to many joins).

My question is, is it possible in wordpress to create an admin page that would allow adding and/or editing of a family and all of the related children in one place (including adding, removing, and editing children as necessary)? If so, are there resources out there that can show me how to do it?

Thanks, Jon


You could also use custom fields, if you want to keep everything family-related on one admin page. The plugin Advanced Custom Fields makes this super-easy. You might want to buy the "repeater field" add-on which would enable you to on-the-fly add any number of child field groups.


It is not possible by default with WordPress (i.e. no internal mechanism for such relations) however the Types free plugin could do 1:M post relationship work within the standard SQL tables - http://wp-types.com/home/types-manage-post-types-taxonomy-and-custom-fields/ - and there is an extra powerful plugin in addition to that used for listing if you need it (or you could code it if you like).


There're multiple things you can do. The first and most obvious would be to create a n:n relation using the "posts2posts-plugin.

Another one would be to make your CPT hierarchical, so you can choose the parent/children relationship there.

I wouldn't use custom taxonomies as family names can be shared under not related families and if you'd have another one for relationsship-status, you'd have the problem that someone can be father, brother, grandfather, etc. at the same time, so you'd be adding a very non important meta information there.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.