Add custom field to taxonomy term I added a custom field to a taxonomy term via 'Manage Fields' (see screenshot here: https://cl.ly/022v2B2H2c1m). How can I display this new field in the Frontend? In my template.php I have this:

$cats = taxonomy_get_tree(7);
$categories = array();
if (!empty($cats)) {
  foreach ($cats as $cat) {
    $parent = $cat-&gt;parents[0];
    $item = array(
      'tid' =&gt; $cat-&gt;tid,
      'name' =&gt; $cat-&gt;name,
      'description' =&gt; $cat-&gt;description,
      'image' =&gt; $cat-&gt;field_images,
      'children' =&gt; array(),
    );

  }
}


When I do a var_dump($item), the image field shows 'NULL', although I added an image. 

Anybody with a solution? 

Best wishes
You can use this - 

$term = taxonomy_term_load($tid);
$field_image = field_get_items('taxonomy_term', $term, 'field_image');
if ($field_image) {
  $headerimg = field_view_value('taxonomy_term', $term, 'field_image', $field_image[0], array('type' =&gt; 'image'));
}
print render($headerimg);


In your file template.php use the theme_preprocess_page function like this :

function mytheme_preprocess_page(&amp;$vars) {
  $term = menu_get_object('taxonomy_term', 2);
  if ($term) {
    $field_header_image = field_get_items('taxonomy_term', $term, 'field_header_image');
    if ($field_header_image) {
      $vars['headerimg'] = field_view_value('taxonomy_term', $term, 'field_header_image', $field_header_image[0], array('type' =&gt; 'image'));
    }
  }
}


Then in you page.tpl.php you can print render($headerimg);