Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hello. I've got Author Taxonomy working perfectly in terms of showing the author's name in an article. However, I'm trying to work out how to add the taxonomy term description for the relevant author - I would like to use the descriptions as author profiles in the articles (most authors will not be site users). Is this possible?
I'm guessing I just need to add a line of code to node.tpl.php but after much searching and testing I've had no luck finding anything that works.
Thanks for any help you can offer.
Comments
Comment #1
sparkells CreditAttribution: sparkells commentedI've kept working on this and finally have it working. If it helps anyone else below is my solution. If there is a better way to do this let me know.
I put the following into template.php:
$vid = 7 refers to the taxonomy vocabulary ID.
I put the following into the appropriate spot in node.tpl.php:
Comment #2
afterdark CreditAttribution: afterdark commentedIt helped a lot! Many thanks.
I choose to put everything in the node.tpl.php, because if i insert the function in the template, the system complains because the function is called twice (!).
Comment #3
gregarios CreditAttribution: gregarios commentedSee this issue for some relevant info.