How to set up an entity (post-type?) with many dependent entities (more post-types?)

You want Posts 2 Posts which is a phenomenal way to efficiently relate different content types in WordPress.

Combine that with with some custom meta boxes with your fields and you’ve got a very nice, usable system that does what you want. There are plenty of tutorials out there on creating custom meta boxes.

So let’s say you have the following post types:

  • athlete
  • athlete_gallery
  • athlete_tournament
  • coach

You relate each with a Post 2 Posts relation:

<?php
add_action('p2p_init', 'wpse59137_connections');
function wpse59137_connections()
{
    // athletes to galleries
    p2p_register_connection_type(array(
        'name'  => 'athlete_to_gallery',
        'from'  => 'athlete',
        'to'    => 'athlete_gallery',
    ));

    // athletes to tournaments
    p2p_register_connection_type(array(
        'name'  => 'athlete_to_tournament',
        'from'  => 'athlete',
        'to'    => 'athlete_tournament',
    ));

    // athletes to coaches
    p2p_register_connection_type(array(
        'name'  => 'athlete_to_coach',
        'from'  => 'athlete',
        'to'    => 'coach',
    ));
}

What you get from the above is a few meta boxes in the admin area to create relationships. Those boxes are also highly customizable, so be sure to check out the docs.