I am trying to setup a relationship between a “People” post type and a “Work” post type.
For example, I want to have a structure like this
Person 1
- Work
- Work 1
- Work 2
Person 2
- Work
- Work 3
- Work 4
How would I setup a relationship so that when a user is making a “Work” post they can associate the “work” post with a “person”?
It sounds like what you are really looking to achieve is to relate posts from the
Person
post-type to posts from theWork
post-type without categories. Out of the box, WordPress doesn’t have the ability to create many to many relationships across post types. To add this functionality you can use the Posts2Posts plugin. This plugin allows you to create many-to-many relationships between posts of any type: post, page, custom etc.For details on how to display your connected Work and Person post types see the Posts2Posts plugin documentation on Github.