Support

Account

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/