Skip Navigation

[Résolu] Relationship in View not working

Ce fil est résolu. Voici une description du problème et la solution proposée.

Problem:

Display grandchild posts with views.

Solution:

It needs nested views, for example:
https://toolset.com/forums/topic/relationship-in-view-not-working/page/2/#post-1783931

Relevant Documentation:

This support ticket is created Il y a 3 années et 11 mois. 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.

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.

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)

Marqué : ,

Ce sujet contient 17 réponses, a 3 voix.

Dernière mise à jour par larryL Il y a 3 années et 11 mois.

Assisté par: Luo Yang.

Auteur
Publications
#1782893

What do you think Waqar?

#1783931

Hello again,

Waqar is on vacations, I will take back this ticket.

I assume we are talking about these two post type relationships:
lien caché
And
lien caché

And I have done below modifications in your website:
1) Create a parent post view "related camera posts":
lien caché
- Query camera posts
- Filter by:
Select posts in a Cameras Camera Issues relationship that are a related to the current post in the loop.
- In view's loop, display the grandchild post view shortcode:
[wpv-view name="camera-related-location"]

2) Edit the grandchild post view "Camera Related Location":
lien caché
Change the filter to:
Select posts in a Cameras TMNA Locations relationship that are a related to the current post in the loop.

3) Edit the grandparent post view "Cameras Report":
lien caché
in section "Loop item in Cameras Report", display the parent post view shortcode:
[wpv-view name="related-camera-posts" cached="off"]

Test it in front-end:
lien caché

It works fine, please check if it is what you want. thanks

#1785109

My issue is resolved now. Thank you!

Ce ticket est maintenant fermé. Si vous êtes un client de Toolset et que vous avez besoin d'aide, veuillez ouvrir un nouveau ticket d'assistance