Skip Navigation

[Resolved] Query types sharing a relation

This thread is resolved. Here is a description of the problem and solution.

Problem:

I have a type "player" and a type "team", related with a 1-N relationship.

A team can have players, a player can have a team.

On a player single display, I wish I could add a view of other players from the same team, but I cannot find any filter for the loop.

Solution:

It is possible with Toolset Views plugin, please follow our document to setup the post view:

Relevant Documentation:

https://toolset.com/documentation/post-relationships/how-to-display-related-posts-with-toolset/displaying-related-child-posts/

This support ticket is created 5 years, 9 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 4 replies, has 2 voices.

Last updated by francoisP-6 5 years, 9 months ago.

Assisted by: Luo Yang.

Author
Posts
#1220430

Hi there,

I have a type "player" and a type "team", related with a 1-N relationship.

A team can have players, a player can have a team.

On a player single display, I wish I could add a view of other players from the same team, but I cannot find any filter for the loop.

Any insight would be of great help !

#1220593

Hello,

It is possible with Toolset Views plugin, please follow our document to setup the post view:
https://toolset.com/documentation/post-relationships/how-to-display-related-posts-with-toolset/displaying-related-child-posts/
Displaying Related Child Posts

#1221071

Hi, thanks for the reply.
I need to create a view, displaying all related children, you are right.
But, I would like to do it without loosing the ability to specify the children layout with Elementor.
Is that possible ?
F.

#1221281

Yes, you can do it without loosing the ability to specify the children layout with Elementor..

You just need to follow the document I mentioned above:
https://toolset.com/documentation/post-relationships/how-to-display-related-posts-with-toolset/displaying-related-child-posts/

1) Create a content template to display parent post information
2) In a single child post content, display above content template shortcode, for example:

[wpv-post-body item="@slug-of-the-relationship.parent" ... ]

See the document:
https://toolset.com/documentation/post-relationships/how-to-display-related-posts-with-toolset/displaying-related-child-posts/#using-views-only

Section "Using Views only".

If you need more assistance for it, please provide a test site with the same problem, also point out the problem page URL and view URL, I can setup a demo for you.

#1223057

My issue is resolved now. Thank you!