Field template in theme based on Garland I have problem with template for field "field_is_new" in Drupal 7.
My_Theme is a modification of the Garland theme. (I don't know if it's important.)

I have created a template for this field in my theme folder ("My_Theme/templates/field--field-is-new.tpl.php").

In template.php, I added:

function My_Theme_preprocess_field(&amp;$variables, $hook) {
  // Add specific suggestions that can override the default implementation.
  array_unshift($variables['theme_hook_suggestions'], 'field__' . $variables['element']['#field_name']);
}


I cleared the cache, and rebuilt the theme.

I was thinking it's good way to do this, but it's not working.
What's wrong?
Your preprocess function is not necessary in this situation because Drupal's default behavior is using this sort of files. Try print_r($variables['theme_hook_suggestions']); and see all relevant suggestions.

Your problem is the wrong filename; try field--field_is_new.tpl.php instead.

The general recommendation is using theme functions:

function theme_field__field_taxonomy($vars) {
  $output = '';

  foreach ($vars['items'] as $delta =&gt; $item) {
    $array = explode(';',$item['#markup']);

    if (count($array)) {
      $output = '&lt;ul class="' . $vars['classes'] . ' clearfix"' . $vars['attributes'] . '&gt;';
      foreach ($array as $value) {
          $output .= '&lt;li&gt;' . trim($value) . '&lt;/li&gt;';
      }
      $output .= '&lt;/ul&gt;';
    };
  }

  return $output;
}