Show title of referenced node in node template I'm working on a node template for my content types and use Entity reference to reference my content with each other. THe machine name of my entity reference field is og_group_ref. In my node template I used print_r(get_defined_vars()) to show all existing varialbes to select variables I need. When I look for og_group_ref I only get the target_id of that reference:

[og_group_ref] =&gt; Array
            (
                [0] =&gt; Array
                    (
                        [target_id] =&gt; 65
                    )
            )


So, my question is how do I get the title of that referenced node?
For example, if I remember node structure right:


Load node by id into $node
Put title to $node_title

$node = node_load(og_group_ref[0][target_id]);

$node_title = $node->title;


All you need is to get og_group_ref object/element