Support

Account

Home Forums Backend Issues (wp-admin) Changing dipslay title of linked items in relationship field Reply To: Changing dipslay title of linked items in relationship field

  • I found a solution. The issue was with my configuration based on the combination of Trellis/Bedrock/Sage by Roots.

    I was putting the above-mentioned code into the setup.php, but it should go into the filters.php (duh…). Also, I had to inline the function as such:

    
    add_filter('acf/fields/relationship/result/name=about_team_profiles', function($title, $post, $field, $post_id) {
      $first_name = get_field('profile_first_name', $post->ID);
      $last_name = get_field('profile_last_name', $post->ID);
    
      $title = $first_name.' '.$last_name;
    
    	return $title;
    }, 10, 4);