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

How to display the profile url in the comments?

Updated April 18, 2018 15:07 PM

Anyone point me to create user review solution?

Updated August 20, 2015 18:03 PM

Anonymous users skip comment approval but they shouldn't

Updated September 25, 2018 15:07 PM

Users rate and comment each other after an event?

Updated April 20, 2015 21:03 PM