I'd like to display the name, picture and signature of a node's author at the bottom of each node. The node.tpl.php file that I'm using (supplied by the zen theme) includes variables for the author's name and picture, but not the signature. How can I make that accessible in the template file?
1 Answer
Figured it out. To add a $user_signature variable to your node.tpl.php file, add this function to your template.php file:
function YOURTHEME_preprocess_node(&$vars, $hook) {
$account = user_load($vars['uid']);
$vars['user_signature'] = check_markup($account->signature, $account->signature_format);
}