Fix for In teasers, display only the first field item.

  1. <?php
  2. function YOURTHEME_preprocess_node(&$vars) {
  3.   // In teasers, display only the first field item.
  4.   if (!$vars['page'] && count($vars['node']->field_YOURFIELD > 1)) {
  5.     $first_item = $vars['node']->field_YOURFIELD[0];
  6.     $vars['node']->field_YOURFIELD = array($first_item);
  7.   }
  8. }
  9. ?>

Submit Fix

Any tags you'd like to associate with your code, delimitered by commas (example: Views, CCK, Module, etc).
Select the syntax highlighting mode to use.