Skip Navigation

[Resolved] View based on multiple post types does not show relationship fields

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

Last updated by Minesh 6 months, 4 weeks ago.

Assisted by: Minesh.

Author
Posts
#2705833

I made a view based on multiple post types. View is accurately showing feature images and post titles. Each post type has various (but common in all) relationship fields.

Now apparently this view is not fetching the data from relationship fields. For example every post type (of that view) has separate relationship with another post type "cities". And now this view is not showing the data of "city (parent)" field. Please help.

Update: Now it worked but not as intended. View is showing posts from various post types. But in the backend title of only one post type can be selected. If I choose title for this post type then title of all the post types is displayed properly. But for the relationship (one to many) field, I need to choose post type which is primarily displayed in template edit screen. I choose city for that post type then it is displayed but only for that particular post type. It is not displayed for all.

And many to many relationship fields do not simply appear in the edit template window.

#2705925

Minesh
Supporter

Languages: English (English )

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

Hello. Thank you for contacting the Toolset support.

Well - here is the Doc that shows information how you can display the many related items:
- https://toolset.com/course-lesson/displaying-related-posts/#displaying-many-related-items

But here you can set the related to one post relationship I'm not sure about your current data structure and relationships.

Can you please share problem URL where you want to display many related items and for what relationships?

*** 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.

#2706102

Minesh
Supporter

Languages: English (English )

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

Well - I see you have created almost hundred post-relationship.

Toolset can not automatically recognize while listing posts that to X post there are four post-relationship assigned (A,B,C,D) and to Y post there are another four post-relationship assigned (AA,BB,CC,DD).

While listing post you have to mention that from what post relationship you want to display the related post.

So, For the post "Punjab Watch Company" - I see the post relationship for City is "City Listing_Watches&Clocks"
- hidden link

So, to display related parent City post for the above post, as you can see with the following screenshot: hidden link
- I've added single field block and selected the parent relationship "City Listing_Watches&Clocks"

But, for another post "Leather to Leather" the post relationship for City is "City Listing_Leather,Textiles&Footware":
- hidden link

And the parent city is belongs to different post relationship "City Listing_Leather,Textiles&Footware".

So we need a way to identify from what post relationship you need to display the related post.

More info:
- https://toolset.com/course-lesson/displaying-related-posts/