Saltar navegación

[Resuelto] show a relationship field in child loop view in parent post

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
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Zona horaria del colaborador: Asia/Kolkata (GMT+05:30)

Este tema contiene 10 respuestas, tiene 1 mensaje.

Última actualización por raffyC 3 months, 2 weeks ago.

Asistido por: Minesh.

Autor
Mensajes
#2847839

Hi,

I have a many-to-many relationship. In the parent post, I have a view loop of all the child associated with the current parent. Problem is I can't find a way to show the relationship field of the parent-child within the child view loop. I tried adding Fields and Text-> View->select field relationship but it's blank. I also tried creating another view loop for intermediary post but it's getting all the relationship from other parents not the current parent.

How can I achieve this?

Thank you.

#2847853

Minesh
Colaborador

Idiomas: Inglés (English )

Zona horaria: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Can you please share problem URL where you added your view as well as admin access details and also share what relationship you want to display from what relationship.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I have set the next reply to private which means only you and I have access to it.

#2847945

Minesh
Colaborador

Idiomas: Inglés (English )

Zona horaria: Asia/Kolkata (GMT+05:30)

The problem URL you shared: enlace oculto

Within the "Scholars" section - what posts you want to display? All "Scholars" posts? if yes, I see you added the following view in the "Scholars" section view loop:

[wpv-view name="donor-scholar-status" wpvrelatedto="[wpv-post-id item='@donor-scholar.parent']"]

When I edit the "Marina Go" post I do not see any related posts added:
- enlace oculto

What exactly the posts you want to display within the "Scholars" section and what fields you want to display with "donor-scholar-status" view.

#2847954

Hi,
Please try the link again. enlace oculto

There is only one field in the "donor-scholar-status" view that I would like to show which is the relationship field between the scholar and donor. Currently there are 2 scholars associated to the donor, each scholar shows the 2 values "Current Current", there should only be one status.

#2847976

Minesh
Colaborador

Idiomas: Inglés (English )

Zona horaria: Asia/Kolkata (GMT+05:30)

Do you see the correct intermediary post type filed value noe: enlace oculto

#2848115
Screenshot 2026-02-14 181648.jpg

Still no. I see the Marina-Rhiane status is "Former Current" (see attached image). The scholar (Rhiane) has 2 donors (Marina and Sonia). The relationship field of Marina-Rhiane is "Current" while Sonia-Rhiane is "Former". Since this is Marina's post I'm expecting only to show "Current" under Rhiane's view.

#2848366

Minesh
Colaborador

Idiomas: Inglés (English )

Zona horaria: Asia/Kolkata (GMT+05:30)

Just wanted to make sure - is this page displaying the correct list of Scholars?
- enlace oculto

If yes, further you want lets say for the "Rhiane Lacansandili" post you want to display the status of scholer?

#2848368

Yes correct.
Yes for "Rhiane Lacansandili" (scholar) I want to display the relationship status with "Marina Go" (donor). So it should display "Current" in this case.

#2848372

Minesh
Colaborador

Idiomas: Inglés (English )

Zona horaria: Asia/Kolkata (GMT+05:30)

Is this displaying the correct output?
- enlace oculto

#2848435

Yes, it's displaying correctly. May I know how you fixed it?
Thank you!

#2848448

Minesh
Colaborador

Idiomas: Inglés (English )

Zona horaria: Asia/Kolkata (GMT+05:30)

With the view that displays all scholers:
- enlace oculto

With the above view's loop template:
- enlace oculto

I've added the following to isplay the intermediary post type field and removed the existing view you were using.

[types field='donor-scholar-relationship-status' item='@donor-scholar.intermediary'][/types]
#2848490

Thank you! My issue is resolved.