Skip Navigation

[Resolved] 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 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 10 replies, has 1 voice.

Last updated by raffyC 1 day, 14 hours ago.

Assisted by: Minesh.

Author
Posts
#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
Supporter

Languages: English (English )

Timezone: 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
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

The problem URL you shared: hidden link

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:
- hidden link

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. hidden link

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
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Do you see the correct intermediary post type filed value noe: hidden link

#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
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

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

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
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Is this displaying the correct output?
- hidden link

#2848435

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

#2848448

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

With the view that displays all scholers:
- hidden link

With the above view's loop template:
- hidden link

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.