Support

Account

Home Forums ACF PRO Relationship field once removed (2nd cousin?) Reply To: Relationship field once removed (2nd cousin?)

  • I’m going to assume that both of these relationship fields are “Post Object” and that you are returning the Post Object. Let me know if this is incorrect.

    
    // code on the property page
    // somewhere inside "The Loop"
    
    // get the project object on from the property post
    $project = get_field('project');
    $product_id = $project->ID;
    
    // get the agent object from the project post
    $agent = get_field('agent', $project_id);
    $agent_id = $agent_id;
    
    // show the title of the agent post
    echo get_the_title($agent_id);