Support

Account

Home Forums ACF PRO Relationship field: how to dynamically populate landing page with CPT content Reply To: Relationship field: how to dynamically populate landing page with CPT content

  • If your relationship field allows more than one value then it will return an array of ID’s and if you are only returning the IDs then you don’t need $post-> you only use this when using setup_postdata()`

    
    $ids = get_field('conference_talks', false, false);
    foreach ($ids as $id) {
      $value = get_field('my_acf_field_name', $id);
    }
    

    All of this is explained in the documentation https://www.advancedcustomfields.com/resources/relationship/