Hi David
Unfortunately we are having a weather-related internet outage where I live and I am on 3g mobile data as a back-up and it's not up to the task of video calling let alone screen sharing, hopefully that will be resolved soon.
So I took another look in the back end of your site and I see what the problem is.
You are basically doing things right, except you are taking a shortcut with your connectors which are introducing the problem.
You have 3 custom post types, and you are sharing one connector CPT for all of the connections between them.
So here is what happens with your view "Related recipes".
It is querying connector posts. It adds a filter to show connectors that are children of the post where this view is shown. So when you add it to the Workout content template, it will return the connectors for that particular workout.
In your loop output section you use the id="$recipe" attribute to specify that we want to output the content of the parent recipe post to this connector, not content of the connector itself.
That was working when you added your first test workout-recipe connectors.
When you added a connector to connect the Workout to a Rest, then you ran into the problem.
You query gets all the connectors that are children of the current workout. But there is nothing to say that you only want recipe connections. You want two filters for this view that say "get all connectors that are children of the current workout and which also have a recipe post as a parent". But there is no means to add the latter part, and your id="$recipe" failed when the other parent was a rest and not a recipe.
You need separate connector post types for each type of connection.
So you need:
- a recipes-and-workouts post type that connects recipes and workouts
- a rests-and-workouts post type that connects rests and workouts
- a workouts-and-workouts post type that connects workouts with related workouts
plus the same for any other combinations, e.g. connecting recipes to rests
Then for your "Related recipes" view you would query the recipes-and-workouts connector post type with a filter as before to show posts that are children of the post where this view is shown, which you add to your workouts content template, and you use the id="$recipe" attribute to get the content for the recipe parent post.
Your "Related rests" view you be essentially the same, but it would be querying the rests-and-workouts connector post type and you would use the id="$rests" attribute in the loop output.
That doubtless sounds like a lot of hard work but is unavoidable if you want to manually specify your post connections rather than use the random post from a category association I described previously.
The work on Types 2.3 with the changes to how post relationships are handled is still very much work-in-progress as far as I can see from the internal tickets, I'm not expecting it to be released soon.