0

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 1

1

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);
}
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.