Hello, I noticed a few things in your code here:
<td> [wpv-post-link item='@radio-milite.child' wpvrelatedto="ids='[wpv-post-id]'"]</td>
<td>[wpv-view name="postazione-in-scheda-piano-radio"]</td>
1. The syntax looks unusual, because the attributes wpvrelatedto and ids do not apply to wpv-post-link shortcodes. These two attributes often apply to wpv-view shortcodes, so I'm not sure if this was a cut-and-paste error, or if something is missing from the code here? If you want to display the link to post type C, the first shortcode should be:
It does not need any shortcode attributes, since the shortcode is displayed in a View of C.
2. I have 3 custom post types. A is related with B, and A is related with C. I have a view with C information and i want to show also B info that are related to A.
You might also need a View of post type A, depending on the type of post relationship between A and C. All post relationships, even many-to-many (M2M) relationships, have parent and child, but they may not be obvious. If you are not sure, go to Toolset > Relationships and edit each relationship. Check the checkbox "I understand that changes to these settings may delete post associations in this Relationship" and click "Edit Settings". You can find out which is parent and which is child.
- If A-C is a one-to-many (O2M) relationship and "A" is the parent, you do not need a View of A in this case. Update the shortcode for View of B like so:
[wpv-view name="postazione-in-scheda-piano-radio" wpvrelatedto="[wpv-post-id item='@relationship-slug.parent']"]
Replace relationship-slug with the slug of the A-C post relationship. This syntax will provide the ID of the related post type A to the Query Filter for the A-B relationship. Remove the Query Filter by post ID from View of B, it is not necessary. Only the post relationship filter is necessary. That should be all you need to do if A-C is a O2M relationship and "A" is the parent.
- If A-C is a O2M relationship and "A" is the child, there can be multiple A's related to each C, so you need a View of A.
- If A-C is a M2M relationship, there can be multiple A's related to each C, so you need a View of A, regardless of which is the parent and which is the child.
- Create a View of post type A
- Add a Post Relationship Query Filter for the A-C post relationship, set by "The current post in the loop".
- In the Loop, insert the post title shortcode for testing purposes only, followed by the View of B with no shortcode attributes:
related post type A: [wpv-post-title]<br />
[wpv-view name="view-of-b"]
- Edit the post relationship Query Filter in the View of B. Set it to "the current post in the loop".
- In View of C, replace the shortcode for View of B with the shortcode for View of A. No shortcode attributes are necessary.
- You should see a list of post type A related to each C, and nested under each A you should see a list of related B's:
Post C 1
- Post A 1
--- Post B 1
--- Post B 2
- Post A 2
--- Post B 3
--- Post B 4
- Post A 3
Post C 2
- Post A 3
--- Post B 6
--- Post B 7
--- Post B 8
--- Post B 9
... and so on. You can verify the A's are related to each C as expected. If not, the Query Filter in View of A needs adjustment. Once all the relationships A, B and C are verified, you can delete the post title shortcode from View of A. Then you will see only a list of B's related to each C.
Let me know if you have questions about these modifications, and I can offer more direct guidance.