Getting subfield on relationship

Toolbox Example

Using ACF you can add a relationship field to create - you know - a relation between the current Post and one or more other Pages or Posts. You can use a Twig template to get the contents of that relationship, select the first iteration and render a specified fieldname by getting it from the ID returned by the relationship, OR you can add the code that is below.

This code will allow you to select an iteration for the relationship and directly target a subfield on the post that is connected. Typically this would be used if your relationship is always connecting to a single Post Type for which you know that this fieldname exists.

[0]field_name

More info on the relationship fieldtype here.