Display a custom field of a content type in template with PHP? I'm using Drupal 7.  I have a content type called Widget.  One of the custom fields is field_widget_position.  When I did a &lt;?php print_r($page); ?&gt; in the template, I can see the key-value pair of field_widget_position buried deep in the array.  Is there an easier way to get a handle on field_widget_position instead of typing &lt;?php echo $page['somefield']['somefield2']['somefield3']['etc....']['field_widget_position']; ?&gt;?
$node-&gt;field_widget_position['en'][0]['value']


This is a bad solution.

The right solution is

render(field_view_field('node', $node, 'field_widget_position'));


or

render(field_view_field('node', $node, 'field_widget_position', array('label' =&gt; 'hidden')));


if you don't want to print a label.

See http://www.computerminds.co.uk/articles/rendering-drupal-7-fields-right-way for more info.