Skip Navigation

[Resolved] Advice in filtering results on a page with a view

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

Problem:

We have a post type for "pump series" and one for "pump manufacturers".

On a manufacturers post we want to display all the pumps for that manufacturer ONLY and then allow the site visitor to filter the list by various fields from the "pump series" post type.

Solution:

In your case, I suggest you try to setup one-to-many relationship between post types "pump manufacturers" and "pump series".
https://toolset.com/documentation/post-relationships/how-to-set-up-post-relationships-using-toolset/

Then in the single "pump manufacturers" post, you can setup a post view to display related "pump series" posts:
- Query "pump series" posts
- Filter by the post type relationship

Relevant Documentation:

https://toolset.com/documentation/post-relationships/how-to-display-related-posts-with-toolset/#displaying-many-related-items

This support ticket is created 5 years, 3 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
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9: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/Hong_Kong (GMT+08:00)

This topic contains 2 replies, has 2 voices.

Last updated by Kirk 5 years, 3 months ago.

Assisted by: Luo Yang.

Author
Posts
#1361059

We are working on a website for a supplier of pumps.

They have "pump series" which are provided by different manufacturers.

We have a post type for "pump series" and one for "pump manufacturers".

On a manufacturers post we want to display all the pumps for that manufacturer ONLY and then allow the site visitor to filter the list by various fields from the "pump series" post type.

Our problem is that the post for an individual manufacturer shows ALL pump series when you open the post - see hidden link (please note: there are only 3 pump series added so far).

So we do not want the Graco Pump that is listed first to appear at all because it is not from this manufacturer which is Calpeda.

We have tried all sorts of things to achieve this with no success so far.

Whilst we have had a Types license for a while now we have never really used it to deliver much complexity so apologies if we are being a bit dim and not seeing the obvious.

Thanks in advance for any help you can offer.

best regards
Kirk

#1361077

Dear Kirk,

How do you setup the relationship between "pump manufacturers" and "pump series" posts?

In your case, I suggest you try to setup one-to-many relationship between post types "pump manufacturers" and "pump series".
https://toolset.com/documentation/post-relationships/how-to-set-up-post-relationships-using-toolset/

Then in the single "pump manufacturers" post, you can setup a post view to display related "pump series" posts:
- Query "pump series" posts
- Filter by the post type relationship

See our document:
https://toolset.com/documentation/post-relationships/how-to-display-related-posts-with-toolset/#displaying-many-related-items

#1363047

My issue is resolved now. Thank you!