Problem:
Many-to-many relationship between post types "fighters" and "fight",
I have 2 fighters - Max and Andre. How can I show Max's Title when I look at Andre's profile?
What settings do I need to make this work?
P.S. Max and André - 2 fighters in a single fight
Solution:
It needs a nested view, for example,
1) parent view get related "fight" posts of current "fighter" post,
filter by:
Select posts in a Fights Fighters relationship that are related to the Post where this View is shown.
And display below child view:
2) Child view get related "fighter" post exclude current "fight" post:
in section "Query Options", enable option "Don't include current page in query result"
filter by:
Select posts in a Fights Fighters relationship that are a related to the current post in the loop.
3) Put the parent view into a single "fighter" post:
<hr /> <h2>Show related fighter's Title</h2> [wpv-view name="related-fights-of-current-fighter-parent-view"]
Please test it, check if it is what you want. thanks
Relevant Documentation:
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.
Aucun de nos assistants n'est disponible aujourd'hui sur le forum Jeu d'outils. Veuillez créer un ticket, et nous nous le traiterons dès notre prochaine connexion. Merci de votre compréhension.
Ce sujet est une subdivision de https://toolset.com/fr/forums/topic/mma-database-design-with-the-help-of-toolset/
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)
Ce sujet contient 3 réponses, a 2 voix.
Dernière mise à jour par Il y a 6 années et 6 mois.
Assisté par: Luo Yang.