Hello
I'm stuck.
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.
Singer 1
Singer 2
Singer 3
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:
<wpv-loop>
[wpv-post-link id="$parent"]
</wpv-loop>
I get the correct number of results but each title links to the Contributor and not to the CD or DVD.
e.g.
Contributor 1
Contributor 2
Contributor 3
Contributor 4
However, if I set the id to CD:
<wpv-loop>
[wpv-post-link id="$cd"]
</wpv-loop>
...then I get the correct CD titles and links but the DVDs link to the Contributor.
e.g.
Contributor 1
Contributor 2
CD 1
CD 2
And if I set the id to DVD:
<wpv-loop>
[wpv-post-link id="$dvd"]
</wpv-loop>
...then I get the correct DVD titles and links but the CDs link to the Contributor.
e.g.
DVD1
DVD2
Contributor 3
Contributor 4
Please can you tell me where I am going wrong? Many Thanks.