Skip Navigation

[Resolved] Displaying a list of posts and their post-relationship data

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

Problem:
Displaying a list of posts and their post-relationship data

Solution:
You need to use nested views in order to display parent and child relationship information on a single page.

You can find the proposed solution, in this case, with the following reply:
https://toolset.com/forums/topic/displaying-a-list-of-posts-and-their-post-relationship-data/#post-1176713

Relevant Documentation:
https://toolset.com/documentation/user-guides/using-a-child-view-in-a-taxonomy-view-layout/

This support ticket is created 5 years, 11 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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

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 3 replies, has 2 voices.

Last updated by tomH-11 5 years, 11 months ago.

Assisted by: Minesh.

Author
Posts
#1176392

Hello,

I have post type that has a post relationship with another post type. It's essentially like an order-detail set up where I have an order post type with a relationship to multiple order-detail post types. For example, the order post type has the name and date of the order and the order detail is the individual items in the order. I need to be able to display this information in a list.

Right now, I can build a view that shows the orders but I don't know how to show the related order detail records along with them. I have this:
Order 1, Joe Blow
Order2, Mark Smith
...

And I need this:
Order1, Jow Blow,
blue car
red car
Order2, Mark Smish
blue car
green car

Can you help me with configuring a view to do that?

#1176713

Minesh
Supporter

Languages: English (English )

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

Hello. Thank you for contacting the Toolset support.

Well - you need to use nested view's structure. You need to filter your view with the relationship.

Please try to follow steps:
- Create a new view that display Order Details
- Add a post-relationship filter from "Query Filter" section.
-- click on the button "Add a filter"
-- Select "Post relationship or repeatable field group owner" and click on the button "Add query filter"
-- Select your relationship and option "current post in the loop", add things you want to display to loop editor section of this view and save the filter and view
- Edit the view which displays the "order", navigate to "loop editor" section of this view and add the view you created above that displays the order details, save the view
- Create a page and add the view that displays order and you will see the order and associated order details will be displayed

More info:
=> https://toolset.com/documentation/user-guides/using-a-child-view-in-a-taxonomy-view-layout/

#1177158

Update: I think I fixed this. Let me continue and I'll update the ticket shortly.

Thanks for the reply. I was a little confused by your explanation but the link to the page helped clear things up. However, when I try to view the results, the page load times out for taking more than 30 seconds. I have about 3,000 "orders" so I wonder if that is an issue. I tried limiting the results to just 2 but it still timed out. Do you have any suggestions for that?

Tom

#1177174

My issue is resolved now. Thank you!