Contextual data for repeater field with a relationship #2443
furai
started this conversation in
Advanced Custom Fields
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey,
Let's say on a customPostType I have a ACF group and within that group there's a repeater with post object relationship field.
This relationship field holds another customPostType2 that has various fields attached to it with data some of which are meant to only be displayed for certain customPostType ids.
How can I register a connection/filter out things so only data meant for the parent customPostType are retrieved from the child customPostType2?
What is the best approach here?
To give you some idea an example GraphQL query:
What I'm trying to achieve is to get pricing data only if monetizations customPostType has the same id as the parent customPostType.
Where can I hook to modify resopnse having all the context? Should I try registering custom connection? I tried the latter but couldn't get
meta_query
to work. https://www.advancedcustomfields.com/resources/query-posts-custom-fields/#examples i wanted to get data in a way that is described in the 4th example.Maybe there's better way to do it?
Any tips appreciated. I don't need concrete answers.
Cheers,
Furai
Beta Was this translation helpful? Give feedback.
All reactions