Return user's multi-value field in comments

by Confused Drupaler   Last Updated December 28, 2017 17:07 PM

Using Drupal 7, I've added a multi-value term reference to my user which permits them to enter their location. I'd like to render this value on each of their comments.

In my .tpl, I've added:

<?php $comment_user = user_load($comment->uid); 
print render(field_view_field('user', $comment_user, 'field_location')); 

This properly returns the name of the city. I think need to enter the delta to find the state, but could use assistance on how to best accomplish this.

Thank you.

Related Questions

Anyone point me to create user review solution?

Updated August 20, 2015 18:03 PM

Users rate and comment each other after an event?

Updated April 20, 2015 21:03 PM