I have a vocabulary called "Category", within it, I have list of terms and sub-terms. The sub-terms are parent of terms such as Sydney is a term and "Arts & Crafts" is a sub-term for Sydney. I have content associated to Arts & Crafts which is a sub-term of Sydney.

How can I get parent term of a term?

Comments

lyricnz’s picture

function taxonomy_get_parents($tid, $key = 'tid')

http://api.drupal.org/api/function/taxonomy_get_parents/6