How can I print a field on my template, not only in node page but in every page.
I use this in my page.tpl but it's wrong:
echo $node->field_custom['und'][0]['value']; Update
I solved using this code on template.php:
function MyTheme_preprocess_page(&$vars) { $mynode = node_load(1); $vars['field_custom'] = field_get_items('node', $mynode, 'field_custom'); } And this in page.tpl:
<?php if (isset($field_custom)) : print $field_custom[0]['value']; endif; ?>