I have set up a many-to-many relationship with four CPTs, for example:
CDs, DVDs and Singers are all parents of Contributor (where Contributor is the intermediary post type).
So... a Singer can contribute to multiple CDs and multiple DVDs and a CD or DVD can have many singers.
I have set up a view to list all the Singers on a CD and inserted it into a content template for a CD. This works fine. I do this by setting the content selection to Contributor, filtering by Post Relationship: Post is child of 'Post where the view is inserted' and in the wpv-loop display the title with the id="$singer". All good. e.g.
So, now I want to list all the CDs and DVDs for a Singer with links to the respective CDs or DVDs. I do not want to display the Contributor title but the title of the CD or DVD CPT. This is where I have a problem.
I have set up a view to list all CDs and DVDs. I have set the content selection to Contributor filtering by Post Relationship: Post is child of 'Post where the view is inserted'. I get the correct message under the filter: "Post type Contributor is a child of CD, DVD and Singer post types".
In the wpv-loop I tried using the id="$parent" as follows:
I get the correct number of results but each title links to the Contributor and not to the CD or DVD.
However, if I set the id to CD:
...then I get the correct CD titles and links but the DVDs link to the Contributor.
And if I set the id to DVD:
...then I get the correct DVD titles and links but the CDs link to the Contributor.
Please can you tell me where I am going wrong? Many Thanks.