Tell us what you are trying to do?
I have two custom post types, Houses and Buyers. I am trying to compare a custom field (house-type-house) from custom post type Houses to (house-type-buyer) from custom post type Buyer.
I'd like to create a view that for example when I select a buyer lists all the houses that meet their criteria based on their set of custom fields.
I appreciate that post relationships can do this if I manually link each buyer to a house but that's not practical.
I would like one company to be able to log in and list a property and then have a view with "Recommended Buyers" built into the content template once it's created and vice versa I'd like another company to list a buyer and then have a view with "Recommended Houses" built into their content template.
Is this possible, I feel it is but can't figure it out?
Hi,
How do you setup the custom fields "house-type-house" and "house-type-buyer"?
If they are multiple choices custom checkboxes fields, I suggest you use a custom hierarchical taxonomy "house-type" to replace it:
https://toolset.com/documentation/user-guides/create-custom-taxonomies/
Register taxonomy "house-type" to both post types:
- house
- buyer
In a single "buyer" post, you can create a nested view:
1) Parent taxonomy view, query terms of taxonomy "house-type", filter by terms assigned to current post
2) Child post view, query posts of "house" post type, filter by "house-type" term from parent taxonomy view.
More help:
https://toolset.com/documentation/user-guides/using-a-child-view-in-a-taxonomy-view-layout/
Ah brilliant, thanks Lou, this is a great start.
Would it be possible to take this one stage further and filter the results more based on a radius of the post types respective address fields?
I'm not too sure if it is resolved but I'm parking the issue for a while. Would it be possible to keep the ticket open? No problem if not.
OK, please update this thread if you need more assistance for it, thanks