Good day
Thanks fo Theme

How change field labels "h2" to "div"

I change in template.php

 // Render the label, if it's not hidden.
  if (!$vars['label_hidden']) {
    $output .= '<div class="field-label"' . $vars['title_attributes'] . '>' . $vars['label'] . ':&nbsp;</div>';
  }

  // Render the items.
  $output .= '<div class="field-items"' . $vars['content_attributes'] . '>';
  foreach ($vars['items'] as $delta => $item) {
    $classes = 'field-item ' . ($delta % 2 ? 'odd' : 'even');
    $output .= '<div class="' . $classes . '"' . $vars['item_attributes'][$delta] . '>' . drupal_render($item) . '</div>';
  }
  $output .= '</div>';

  // Render the top-level wrapper element.
  $tag = $vars['tag'];
  $output = "<$tag class=\"" . $vars['classes'] . '"' . $vars['attributes'] . '>' . $output . "</$tag>";

  return $output;
}

But, only name of taxonomy voc-ry changed, another field name - without change

Comments

Jeff Burnz’s picture

Taxonomy field has its own template in the core theme, override that also.

manoloka’s picture

When I use the code above I get a blank screen :(

Dreamweaver tells me that there's 2 errors in the code (sorry I'm not a programmer so I don't know which ones are)

one in this line (2nd from bottom)

$output = "<$tag class="" . $vars['classes'] . '"' . $vars['attributes'] . '>' . $output . "</$tag>";

another one on the last closing brace

}