How to display $date in node.tpl.php using a preprocess function in template.php I want to check if the node is not a static page, and display $date in "node.tpl.php" within this &lt;div&gt;:

&lt;div id="postDateArea"&gt;&lt;/div&gt;


I currently have this in my node.tpl.php file:

&lt;div id="postDateArea"&gt;&lt;?php print $date; ?&gt;&lt;/div&gt;


I currently have this in my template.php file:

function thebridge_preprocess_node(&amp;$vars) {
  if($vars['type'] != 'static_page') {
  }
}
function thebridge_preprocess_node(&amp;$vars) {
  if($vars['type'] != 'static_page') {
    $vars['date'] = date('Y-m-d');
  }
}


You might want to change the parameters of date(). More information in the Drupal documentation.