Skip Navigation

[Resolved] Many-To-Many Query Filter Improvement Suggestion

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

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 2 voices.

Last updated by Minesh 6 years, 9 months ago.

Assisted by: Minesh.

Author
Posts
#628137

Hi Toolset,

Quick suggestion and there may be a solution I'm already missing. Let me know if this is already possible.

I've noticed a fair amount of times already that it'd be a quicker workflow to create a view that notices post types that share a relationship with another post. For example:

2 Providers Collaborate and make:
*****
10 Products
5 Videos
2 Photos

In some projects I have in development I'd like to showcase these three types and there relationships. Currently selecting them in a many to many fashion for a view is a fair amount of redundant moves.

Suggestion: A quicker workflow may be to filter accordingly to these 17 posts having a relationship to the same provider(s) via a view.

Let me know if you have any questions. Great work on Many-To-Many!

#628259

Minesh
Supporter

Languages: English (English )

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

Hello. Thank you for contacting the Toolset support.

Well - As I understand - you want to display posts belongs to single provider or related providers?

What is the current post type relationship you implemented and how you are displaying it and why you think its redundant?

Could you please share a nice example that will help me to understand your issue better and I can guide you in right direction.

#628524
Screen Shot 2018-03-26 at 2.53.11 PM.jpg

Hi Minesh,

Thanks for the prompt response. a graphic shows my suggestion best.

Currently connections for related content need to be made independently. This is fine for small amounts of content however with a large amount of many-to-many relationships this isn't possible to maintain.

The left graphic shows 20 steps needed to connect content.

The right graphic shows that these can be connected due to their common relationship of 1 CPT type (profile)

Hopefully that clarifies. Let me know if you have any questions!

#628657

Minesh
Supporter

Languages: English (English )

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

Well - thanks for you suggestion. I'll pass your suggestion to concern person who is handling the view's feature requests.

#628706

Minesh
Supporter

Languages: English (English )

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

Thanks for sharing the info and I tried to check with our Devs but we still not have idea what exactly you want to do with view's filters.

Filters needs to work for each relationship as per defined solution for view's. I dont know if you are aware about the "Post Reference" field that you can use it to display your related post and that may be able to reduce the relationship filters.

More info:
=> https://toolset.com/documentation/post-relationships/how-to-display-related-posts-with-toolset/using-post-reference-fields-to-display-information-from-a-related-post/

#628807
view-suggestion.jpg

Hi Minesh,

Thanks for the work on this. Regarding the new post reference feature I'm familiar however it only allows for 1 post reference. In the event you need 2 many-to-many is necessary.

Here's another screenshot. To better clarify. I've modified how the view panel would look via HTML. Would you mind passing this along to the devs as well? Let me know if they have any questions or a solution already in place.

#628811

Typo:

#3 should read:

Show posts that share the same mutual relationship with a connected many-to-many custom post type.

#629147

Minesh
Supporter

Languages: English (English )

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

As I understand - do you want to display same posts that have same parent/child relationship with another M2M?

What do you mean when you say mutual?

it would be great if you can send me proper test example with post types and its relationship (all M2M relationship) and what exactly the output you are looking for. As by checking only the graph images I have really nothing to share with our Devs.

I need all required information in order to present to the devs.

#629233

Hi Minesh,

Just checking, did you see the view-suggestion.jpg image attached?

#629245

Forgot to mention,

An example isn't possible other than simulated screenshots. By mutual I meant 'sharing the same'.

In this case rather than a parent child relationship posts share the same many-to-many relationship w/ another post in a many-to-many CPT.

Thanks again!:)

#629279

Minesh
Supporter

Languages: English (English )

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

When you say profile - do you mean user profile (author ID) or profile is CPT here?
- Do you mean there is 2 M2M relationship and you want to find posts belongs to same author in both M2M relationship?

BTW - with M2M is connected using intermediary post type so there is no way to connect another M2M relationship as relationship is the key here to fetch the posts.

Until and unless we have clear example and picture you share it's hard for me to present it to Devs.