Skip Navigation

[Resolved] Displaying only posts connected via post relationship

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

Our next available supporter will start replying to tickets in about 2.45 hours from now. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 1 reply, has 2 voices.

Last updated by Christian Cox 5 years, 2 months ago.

Assisted by: Christian Cox.

Author
Posts
#1341187

Tell us what you are trying to do?
I have 2 post types:
1) Qualifications
2) Clients

I have made a many-to-many relationship between these two post types so when you add a qualification you then tag the client this is assigned to.

I am trying to create a search & results view to only show the qualifications assigned to that person, would this mean I would have to create a view for each client?

Thanks

Is there any documentation that you are following?

Is there a similar example that we can see?

What is the link to your site?

#1341431

Hello, you can probably do this with just one View. The configurations for the Query Filter depend on where you plan to show this View of Qualifications:
A. On the Client single post page
B. Nested inside a View of Clients
C. Somewhere else

In A, you can configure the post relationship Query Filter to be: "Select...as related items of the post where this View is shown." This sets the Client relationship based on the current page.

In B, you can configure the post relationship Query Filter to be "Select...as related items of the current post in the loop" This sets the Client based on each result of the View, and makes sense if you want to have a list of Clients and nest inside that list another list of related Qualifications.

In C, you can use an arbitrary value in a shortcode attribute to set the Client dynamically. This technique is called passing arguments to views and is described here: https://toolset.com/documentation/user-guides/passing-arguments-to-views/
You could also choose a static Client in the post relationship filter.

Let me know if you have questions about these approaches.