Can't show custom user field on nodes This is a follow up question to: How do I show user attributes on articles?

I still can't get the "Twitter URL" field to show up on articles, and got tired of reading through the Fields API docs; I figured I couldd ask if anyone can look at my template files, and tell me why the twitter URL is not output, as I know it is being set. 

This is the node preprocess function from node.tpl.php:

function blogbuzz_preprocess_node(&amp;$vars, &amp;$variables) {
  if ($vars['view_mode'] != 'full' &amp;&amp; $vars['id'] == 1) {
    $vars['classes_array'][] = 'node-first';
  }

  if ($vars['view_mode'] == 'full' &amp;&amp; node_is_page($vars['node'])) {
    $vars['classes_array'][] = 'node-full';

  }
  // Even though there's a user object in $variables['user'], we need to
  // load a new copy because the preloaded one doesn't have have field data
  $user = user_load($variables['uid']);

  // Retrieve the data and its value for the Twitter URL field
  // Replace field_twitter_url with the short name of the field
  // found at admin/config/people/accounts/fields
  $items = field_get_items('user', $user, 'field_twitter_url');
  $field = field_view_value('user', $user, 'field_twitter_url', $items[0]);

  // Get the rendered output of the field for use in the submitted line
  $twitter_url = drupal_render($field);

  // If you wanted to get more fields, repeat the last three lines, replacing
  // field_twitter_url with the names of the other fields.
  $variables['twitter_url'] = $twitter_url;
}


And here is  the template.tpl where I use $twitter_url:

&lt;div class="&lt;?php print $classes; ?&gt;"&gt;
  &lt;div class="node-inner clearfix"&gt;
    &lt;?php print render($title_prefix); ?&gt;
    &lt;?php if (!$page): ?&gt;
      &lt;h2&lt;?php print $title_attributes; ?&gt;&gt;&lt;a href="&lt;?php print $node_url; ?&gt;"&gt;&lt;?php print $title; ?&gt;&lt;/a&gt;&lt;/h2&gt;
    &lt;?php endif; ?&gt;
    &lt;?php print render($title_suffix); ?&gt;

    &lt;div class="meta"&gt;
      &lt;?php if ($display_submitted): ?&gt;
        &lt;?php print t('Published by '); ?&gt;&lt;?php print $name.t(' on ').$date; ?&gt;
         &lt;?php print t('Twitter '); ?&gt;&lt;?php print $twitter_url; ?&gt;
      &lt;?php endif; ?&gt;

      &lt;?php if (!empty($content['field_tags'])): ?&gt;
        &lt;?php print ' in '.render($content['field_tags']);  ?&gt;
      &lt;?php endif; ?&gt;

    &lt;/div&gt;
    &lt;div class="content clearfix"&gt;
    &lt;?php
      hide($content['comments']);
      hide($content['links']);
      hide($content['field_tags']);
      print render($content);
    ?&gt;
    &lt;/div&gt;

    &lt;?php if ($content['links']): ?&gt;
      &lt;div class="extra-links"&gt;
        &lt;?php if (!$page): ?&gt;
          &lt;div class="read-more"&gt;&lt;?php print l(t('Read more'), 'node/' . $nid, array('attributes' =&gt; array('class' =&gt; t('node-readmore-link')))); ?&gt;&lt;/div&gt;
        &lt;?php endif; ?&gt;
        &lt;?php print render($content['links']); ?&gt;
      &lt;/div&gt;
    &lt;?php endif; ?&gt;

    &lt;?php print render($content['comments']); ?&gt;
  &lt;/div&gt;
&lt;/div&gt; &lt;!-- /node-inner, /node --&gt;
You are trying to render the twitter_url twice. First in then preprocess function and then again in the template.

If that's not the problem, start debugging. Install devel.module if you haven't already and add dpm($variable) statements on the relevant places, e.g. dpm($twitter_url) in the preprocess function.