Home › Forums › General Issues › Getting related ACF fields from CPT in basic loop › Reply To: Getting related ACF fields from CPT in basic loop
I cannot help you with blocks.
This issue is that the the relationship in the testimony post only stores post ID values of the country and continent posts. What you are trying to accomplish cannot be done using wp_query, or at least not a single query, unless you already know the ID values of the country continent post, if you are building this on a specific country or contentment page then this could be done because you have the correct post ID. However it cannot be done using blocks because the relationship field is not stored in post meta when using the new block editor, the fields are stored in “post_content”
Sorry, I’m not sure if this is any help because I don’t know how these relationships are set up for the testimonial. Are they in blocks or not?
This is how you would do this if you were using acf fields not in blocks.
https://www.advancedcustomfields.com/resources/querying-relationship-fields/
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.