Forums › Forums › Search & Filter Pro › Searching on Data Related via ACF
Tagged: acf relationship
- This topic has 5 replies, 2 voices, and was last updated 4 years, 7 months ago by Trevor.
-
Anonymous(Private) April 21, 2020 at 5:36 am #240701
I have setup something like the the following data setup with ACF and custom post types:
1. Post Type: “Child Data”
a. field A (via ACF)
b. field B (via ACF)
c. an ACF “Relationship” to one post type “Parent Data”2. Post Type: “Parent Data”
a. field C (via ACF)
b. field D (via ACF)I have the SearchAndFilter plugin doing a search against “Child Data”. It can successfully search and filter “field A” and “field B” for “Child Data”. But it cannot search or filter on “field C” or “field D” even though it is related via the ACF relationship.
Can you advise how to set this up so I can also filter on the related data via the parent object?
Thanks!
Trevor(Private) April 21, 2020 at 12:08 pm #240743Whilst we do support most ACF fields, some complex ones (such as repeater) are not supported. A relationship field is supported insofar as we can fetch the ID or Title of the related post, but no other associated data. This limits what you can search for.
Correctly coded, you can use the ID to fetch and display associated data in your results, depending on how your template works.
-
AuthorPosts