Support

Account

Home Forums ACF PRO Picking data from a custom field of another CPT Reply To: Picking data from a custom field of another CPT

  • When you are showing the “Dish” and listing the “Restaurant” you can get and show the address from the restaurant, you just need to supply the restaurant post ID when you call get the field.

    
    // assumes that the post object field on "Dish" returns "Post Object"
    $restaurant = get_field('restaurant');
    $address = get_field('address', => $restaurant->ID);
    

    https://www.advancedcustomfields.com/resources/how-to-get-values-from-another-post/