Skip Navigation

[Closed] Filter posts by custom field in a related post

This support ticket is created 2 years, 10 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 3 replies, has 2 voices.

Last updated by Luo Yang 2 years, 10 months ago.

Assisted by: Luo Yang.

Author
Posts
#2600453

Tell us what you are trying to do?
We have 4 Custom post types. Person, Role, Location and Organisation.
These are linked by Many to Many relationships. (Most would only need one to many but the back end editing experience is better for our client using many to many)

We can display related post fields using nested views.

We wish to filter People by a custom field in Role.
I know this is not possible out of the box but is it possible with custom code?

Is there any documentation that you are following?

Is there a similar example that we can see?
No the site is under local development

What is the link to your site?
Local siye

#2600581

Hello,

Yes, there isn't such kind of built-in feature within Toolset plugins, it needs custom codes, you can follow our document to setup the custom codes:
https://toolset.com/documentation/programmer-reference/views-filters/#wpv_filter_query

If you need assistance for it, here is a sandbox website:
hidden link

Please reproduce the same settings(custom posts, fields and post type relationships) in above sandbox website, also point out the:
- View URL (filter People by a custom field in Role)
- Page URL (where I can test the result in frontend.)

I need to test and debug the custom codes in a live website.

#2601371

Thanks.

We have got the filters wirking as seen here.
hidden link
Diocese is actually with a relationship to organisation.

How are we able to select from the 3 filters without having to click submit. Ajax doesn't seem to work

#2602659

How do you setup the relationship filters?
Please provide your website credentials in below private message box, I need to test and debug it in a live website. thanks

The topic ‘[Closed] Filter posts by custom field in a related post’ is closed to new replies.